diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/appres/common/AppResManagedBean.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/appres/common/AppResManagedBean.java deleted file mode 100644 index bd9be8d2a7..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/appres/common/AppResManagedBean.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.assembly.appres.common; - -import com.sun.ts.tests.ejb30.common.helloejbjar.HelloRemoteIF; - -import jakarta.annotation.ManagedBean; -import jakarta.annotation.PostConstruct; -import jakarta.annotation.Resource; -import jakarta.ejb.EJB; - -@ManagedBean("test-managed-bean") -public class AppResManagedBean extends AppResBeanBase { - public static final String NAME = "AppResManagedBean"; - - @EJB(lookup = "java:app/env/hello") - private HelloRemoteIF hello; - - @EJB(lookup = "java:app/env/AppResBean-remote") - private AppResRemoteIF appResBeanRemote; - - @EJB(lookup = "java:app/env/AppResBean-local") - private AppResLocalIF appResBeanLocal; - - @SuppressWarnings("unused") - @PostConstruct - private void postConstruct() { - AppResTest.beanPostConstruct(myString, getPostConstructRecords(), true, - false); - AppResTest.verifyInjections(getPostConstructRecords(), hello, - appResBeanRemote, appResBeanLocal); - } - - @SuppressWarnings("unused") - @Resource(lookup = "java:app/env/myString") - private void setMyString(String s) { - this.myString = s; - } - - @Override - public String getName() { - return NAME; - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/appres/warmbean/AppResBean.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/appres/warmbean/AppResBean.java deleted file mode 100644 index fa2c86d4e9..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/appres/warmbean/AppResBean.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.assembly.appres.warmbean; - -import com.sun.ts.tests.ejb30.assembly.appres.common.AppResBeanBase; -import com.sun.ts.tests.ejb30.assembly.appres.common.AppResCommonIF; -import com.sun.ts.tests.ejb30.assembly.appres.common.AppResLocalIF; -import com.sun.ts.tests.ejb30.assembly.appres.common.AppResManagedBean; -import com.sun.ts.tests.ejb30.assembly.appres.common.AppResRemoteIF; -import com.sun.ts.tests.ejb30.assembly.appres.common.AppResTest; -import com.sun.ts.tests.ejb30.common.helloejbjar.HelloRemoteIF; -import com.sun.ts.tests.ejb30.common.helper.Helper; -import com.sun.ts.tests.ejb30.lite.packaging.war.datasource.common.DataSourceTest; - -import jakarta.annotation.PostConstruct; -import jakarta.annotation.Resource; -import jakarta.ejb.EJB; -import jakarta.ejb.Stateless; -import jakarta.ejb.TransactionManagement; -import jakarta.ejb.TransactionManagementType; - -@Stateless -@TransactionManagement(TransactionManagementType.BEAN) -public class AppResBean extends AppResBeanBase - implements AppResRemoteIF, AppResLocalIF { - - @EJB(lookup = "java:app/env/hello") - private HelloRemoteIF hello; - - @EJB(lookup = "java:app/env/AppResBean-remote") - private AppResRemoteIF appResBeanRemote; - - @EJB(lookup = "java:app/env/AppResBean-local") - private AppResLocalIF appResBeanLocal; - - @Resource - private AppResManagedBean appResManagedBean; - - @Resource(type = AppResManagedBean.class, lookup = "java:module/test-managed-bean") - private AppResCommonIF testManagedBean; - - @SuppressWarnings("unused") - @PostConstruct - private void postConstruct() { - Helper.assertEquals(null, AppResManagedBean.NAME, - appResManagedBean.getName(), getPostConstructRecords()); - Helper.assertEquals(null, AppResManagedBean.NAME, testManagedBean.getName(), - getPostConstructRecords()); - - AppResTest.beanPostConstruct(myString, getPostConstructRecords(), true, - true); - DataSourceTest.verifyDataSource(getPostConstructRecords(), false, - "java:app/env/appds", - "java:global/env/ejb3_assembly_appres_warmbean/globalds"); - AppResTest.verifyInjections(getPostConstructRecords(), hello, - appResBeanRemote, appResBeanLocal); - } - - @SuppressWarnings("unused") - @Resource(name = "java:app/env/myString") - private void setMyString(String s) { - this.myString = s; - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/appres/warmbean/Client.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/appres/warmbean/Client.java deleted file mode 100644 index 3df819d136..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/appres/warmbean/Client.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 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.ejb30.assembly.appres.warmbean; - -import java.io.PrintWriter; - -import com.sun.ts.lib.harness.Status; -import com.sun.ts.tests.servlet.common.client.AbstractUrlClient; - -public class Client extends AbstractUrlClient { - - public static final String CONTEXT_ROOT = "/ejb3_assembly_appres_warmbean_web"; - - public static final String SERVLET_NAME = "TestServlet"; - - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } - - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - @Override - public Status run(String args[], PrintWriter out, PrintWriter err) { - setServletName(SERVLET_NAME); - setContextRoot(CONTEXT_ROOT); - return super.run(args, out, err); - } - - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ - - /* - * @testName: clientPostConstruct - * - * @test_Strategy: declare resources in application.xml and inject them into - * web client. - */ - public void clientPostConstruct() throws Exception { - TEST_PROPS.setProperty(APITEST, "clientPostConstruct"); - invoke(); - } - - /* - * @testName: mbeanPostConstruct - * - * @test_Strategy: declare resources in application.xml and inject them into - * managed bean. - */ - public void mbeanPostConstruct() throws Exception { - TEST_PROPS.setProperty(APITEST, "mbeanPostConstruct"); - invoke(); - } - - /* - * @testName: ejbPostConstruct - * - * @test_Strategy: declare resources in application.xml and inject them into - * AppResBean. - */ - public void ejbPostConstruct() throws Exception { - TEST_PROPS.setProperty(APITEST, "ejbPostConstruct"); - invoke(); - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/appres/warmbean/ClientTest.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/appres/warmbean/ClientTest.java deleted file mode 100644 index 395fef6bb0..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/appres/warmbean/ClientTest.java +++ /dev/null @@ -1,195 +0,0 @@ -package com.sun.ts.tests.ejb30.assembly.appres.warmbean; - -import com.sun.ts.tests.ejb30.assembly.appres.warmbean.Client; -import java.net.URL; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.OperateOnDeployment; -import org.jboss.arquillian.container.test.api.OverProtocol; -import org.jboss.arquillian.container.test.api.TargetsContainer; -import org.jboss.arquillian.junit5.ArquillianExtension; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.StringAsset; -import org.jboss.shrinkwrap.api.exporter.ZipExporter; -import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.junit.jupiter.api.MethodOrderer; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestMethodOrder; -import org.junit.jupiter.api.extension.ExtendWith; -import tck.arquillian.porting.lib.spi.TestArchiveProcessor; -import tck.arquillian.protocol.common.TargetVehicle; - - - -@ExtendWith(ArquillianExtension.class) -@Tag("platform") -@Tag("ejb_3x_remote_optional") -@Tag("web_optional") -@Tag("tck-javatest") - -@TestMethodOrder(MethodOrderer.MethodName.class) -public class ClientTest extends com.sun.ts.tests.ejb30.assembly.appres.warmbean.Client { - @Deployment(name = "ejb3_common_helloejbjar_standalone_component", order = 1, testable = false) - public static JavaArchive createCommonDeployment() { - JavaArchive ejb3_common_helloejbjar_standalone_component_ejb = ShrinkWrap.create(JavaArchive.class, "ejb3_common_helloejbjar_standalone_component_ejb.jar"); - // The class files - ejb3_common_helloejbjar_standalone_component_ejb.addClasses( - com.sun.ts.tests.ejb30.common.helloejbjar.HelloCommonIF.class, - com.sun.ts.tests.ejb30.common.helloejbjar.HelloRemoteIF.class, - com.sun.ts.tests.ejb30.common.helloejbjar.HelloLocalIF.class, - com.sun.ts.tests.ejb30.common.helloejbjar.HelloBeanBase.class, - com.sun.ts.tests.ejb30.common.helloejbjar.HelloBean.class, - com.sun.ts.tests.ejb30.common.helper.TLogger.class - ); - URL ejbResURL = Client.class.getResource("/com/sun/ts/tests/ejb30/common/helloejbjar/ejb3_common_helloejbjar_standalone_component_ejb.jar.sun-ejb-jar.xml"); - if(ejbResURL != null) { - ejb3_common_helloejbjar_standalone_component_ejb.addAsManifestResource(ejbResURL, "sun-ejb-jar.xml"); - } - - return ejb3_common_helloejbjar_standalone_component_ejb; - } - - /** - EE10 Deployment Descriptors: - ejb3_assembly_appres_warmbean: META-INF/application.xml,ear.sun-application.xml - ejb3_assembly_appres_warmbean_ejb: - ejb3_assembly_appres_warmbean_web: - - Found Descriptors: - Ejb: - - War: - - Ear: - - /com/sun/ts/tests/ejb30/assembly/appres/warmbean/application.xml - /com/sun/ts/tests/ejb30/assembly/appres/warmbean/ejb3_assembly_appres_warmbean.ear.sun-application.xml - /com/sun/ts/tests/ejb30/assembly/appres/warmbean/ejb3_assembly_appres_warmbean.ear.sun-application.xml - */ - @TargetsContainer("tck-javatest") - @OverProtocol("javatest") - @Deployment(name = "ejb3_assembly_appres_warmbean", order = 2) - public static EnterpriseArchive createDeployment(@ArquillianResource TestArchiveProcessor archiveProcessor) { - // War - // the war with the correct archive name - WebArchive ejb3_assembly_appres_warmbean_web = ShrinkWrap.create(WebArchive.class, "ejb3_assembly_appres_warmbean_web.war"); - // The class files - ejb3_assembly_appres_warmbean_web.addClasses( - com.sun.ts.tests.ejb30.assembly.appres.common.AppResManagedBean.class, - com.sun.ts.tests.ejb30.assembly.appres.warmbean.TestServlet.class, - com.sun.ts.tests.servlet.common.servlets.HttpTCKServlet.class, - com.sun.ts.tests.ejb30.assembly.appres.common.TestServletBase.class, - com.sun.ts.tests.servlet.common.util.Data.class, - com.sun.ts.tests.ejb30.assembly.appres.common.TestServletBase2.class - ); - // The web.xml descriptor - URL warResURL = Client.class.getResource("com/sun/ts/tests/ejb30/assembly/appres/warmbean/ejb3_assembly_appres_warmbean_web.xml"); - if(warResURL != null) { - ejb3_assembly_appres_warmbean_web.addAsWebInfResource(warResURL, "web.xml"); - } - // The sun-web.xml descriptor - warResURL = Client.class.getResource("/com/sun/ts/tests/ejb30/assembly/appres/warmbean/ejb3_assembly_appres_warmbean_web.war.sun-web.xml"); - if(warResURL != null) { - ejb3_assembly_appres_warmbean_web.addAsWebInfResource(warResURL, "sun-web.xml"); - } - - // Any libraries added to the war - - // Web content - // Call the archive processor - archiveProcessor.processWebArchive(ejb3_assembly_appres_warmbean_web, Client.class, warResURL); - - // Ejb - // the jar with the correct archive name - JavaArchive ejb3_assembly_appres_warmbean_ejb = ShrinkWrap.create(JavaArchive.class, "ejb3_assembly_appres_warmbean_ejb.jar"); - // The class files - ejb3_assembly_appres_warmbean_ejb.addClasses( - com.sun.ts.tests.ejb30.assembly.appres.common.AppResManagedBean.class, - com.sun.ts.tests.ejb30.assembly.appres.warmbean.AppResBean.class - ); - // The ejb-jar.xml descriptor - URL ejbResURL = Client.class.getResource("/com/sun/ts/tests/ejb30/assembly/appres/warmbean/ejb3_assembly_appres_warmbean_ejb.xml"); - if(ejbResURL != null) { - ejb3_assembly_appres_warmbean_ejb.addAsManifestResource(ejbResURL, "ejb-jar.xml"); - } - // The sun-ejb-jar.xml file - ejbResURL = Client.class.getResource("/com/sun/ts/tests/ejb30/assembly/appres/warmbean/ejb3_assembly_appres_warmbean_ejb.jar.sun-ejb-jar.xml"); - if(ejbResURL != null) { - ejb3_assembly_appres_warmbean_ejb.addAsManifestResource(ejbResURL, "sun-ejb-jar.xml"); - } - // Call the archive processor - archiveProcessor.processEjbArchive(ejb3_assembly_appres_warmbean_ejb, Client.class, ejbResURL); - - // Ear - EnterpriseArchive ejb3_assembly_appres_warmbean_ear = ShrinkWrap.create(EnterpriseArchive.class, "ejb3_assembly_appres_warmbean.ear"); - - // Any libraries added to the ear - URL libURL; - JavaArchive shared_lib = ShrinkWrap.create(JavaArchive.class, "shared.jar"); - // The class files - shared_lib.addClasses( - com.sun.ts.tests.ejb30.assembly.appres.common.AppResLocalIF.class, - com.sun.ts.tests.ejb30.lite.packaging.war.datasource.common.DataSourceTest.class, - com.sun.ts.tests.ejb30.assembly.appres.common.AppResBeanBase.class, - com.sun.ts.tests.ejb30.common.helper.Helper.class, - com.sun.ts.tests.ejb30.assembly.appres.common.AppResCommonIF.class, - com.sun.ts.tests.ejb30.assembly.appres.common.AppResTest.class, - com.sun.ts.tests.ejb30.assembly.appres.common.AppResRemoteIF.class, - com.sun.ts.tests.ejb30.common.helloejbjar.HelloCommonIF.class, - com.sun.ts.tests.ejb30.lite.tx.cm.common.CoffeeEJBLite.class, - com.sun.ts.tests.ejb30.common.helloejbjar.HelloLocalIF.class, - com.sun.ts.tests.ejb30.common.helper.ServiceLocator.class, - com.sun.ts.tests.ejb30.common.helloejbjar.HelloRemoteIF.class - ); - - - ejb3_assembly_appres_warmbean_ear.addAsLibrary(shared_lib); - - - // The component jars built by the package target - ejb3_assembly_appres_warmbean_ear.addAsModule(ejb3_assembly_appres_warmbean_ejb); - ejb3_assembly_appres_warmbean_ear.addAsModule(ejb3_assembly_appres_warmbean_web); - - - - // The application.xml descriptor - URL earResURL = Client.class.getResource("/com/sun/ts/tests/ejb30/assembly/appres/warmbean/application.xml"); - if(earResURL != null) { - ejb3_assembly_appres_warmbean_ear.addAsManifestResource(earResURL, "application.xml"); - } - // The sun-application.xml descriptor - earResURL = Client.class.getResource("/com/sun/ts/tests/ejb30/assembly/appres/warmbean/application.ear.sun-application.xml"); - if(earResURL != null) { - ejb3_assembly_appres_warmbean_ear.addAsManifestResource(earResURL, "sun-application.xml"); - } - // Call the archive processor - archiveProcessor.processEarArchive(ejb3_assembly_appres_warmbean_ear, Client.class, earResURL); - return ejb3_assembly_appres_warmbean_ear; - } - - @Test - @Override - @OperateOnDeployment("ejb3_assembly_appres_warmbean") - public void clientPostConstruct() throws java.lang.Exception { - super.clientPostConstruct(); - } - - @Test - @Override - @OperateOnDeployment("ejb3_assembly_appres_warmbean") - public void mbeanPostConstruct() throws java.lang.Exception { - super.mbeanPostConstruct(); - } - - @Test - @Override - @OperateOnDeployment("ejb3_assembly_appres_warmbean") - public void ejbPostConstruct() throws java.lang.Exception { - super.ejbPostConstruct(); - } - - -} \ No newline at end of file diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/appres/warmbean/TestServlet.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/appres/warmbean/TestServlet.java deleted file mode 100644 index ba1c546042..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/appres/warmbean/TestServlet.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.ejb30.assembly.appres.warmbean; - -import java.io.IOException; - -import com.sun.ts.tests.ejb30.assembly.appres.common.AppResCommonIF; -import com.sun.ts.tests.ejb30.assembly.appres.common.AppResManagedBean; -import com.sun.ts.tests.ejb30.assembly.appres.common.AppResTest; -import com.sun.ts.tests.ejb30.assembly.appres.common.TestServletBase2; -import com.sun.ts.tests.ejb30.lite.packaging.war.datasource.common.DataSourceTest; - -import jakarta.annotation.PostConstruct; -import jakarta.annotation.Resource; -import jakarta.servlet.ServletException; -import jakarta.servlet.annotation.WebServlet; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; - -@WebServlet(urlPatterns = "/TestServlet", loadOnStartup = 1) -public class TestServlet extends TestServletBase2 { - @Resource - private AppResManagedBean appResManagedBean; - - @Resource(type = AppResManagedBean.class, lookup = "java:module/test-managed-bean") - private AppResCommonIF testManagedBean; - - @SuppressWarnings("unused") - @PostConstruct - private void postConstruct2() { - DataSourceTest.verifyDataSource(postConstructRecords, false, - "java:app/env/appds", - "java:global/env/ejb3_assembly_appres_warmbean/globalds"); - } - - public void clientPostConstruct(HttpServletRequest request, - HttpServletResponse response) throws ServletException, IOException { - verifyRecords(request, response, postConstructRecords); - } - - public void mbeanPostConstruct(HttpServletRequest request, - HttpServletResponse response) throws ServletException, IOException { - verifyRecords(request, response, - appResManagedBean.getPostConstructRecords()); - verifyRecords(request, response, testManagedBean.getPostConstructRecords()); - } - - public void ejbPostConstruct(HttpServletRequest request, - HttpServletResponse response) throws ServletException, IOException { - verifyRecords(request, response, - AppResTest.getAppResBeanLocal().getPostConstructRecords()); - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/appres/warmbean/application.xml.template b/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/appres/warmbean/application.xml.template deleted file mode 100644 index 2e96101a66..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/appres/warmbean/application.xml.template +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - ejb3_assembly_appres_warmbean_web.war - ejb3_assembly_appres_warmbean_web - - - - - ejb3_assembly_appres_warmbean_ejb.jar - - - - java:app/env/myString - java.lang.String - myString - - - - java:app/env/hello - Session - com.sun.ts.tests.ejb30.common.helloejbjar.HelloRemoteIF - java:global/ejb3_common_helloejbjar_standalone_component_ejb/HelloBean!com.sun.ts.tests.ejb30.common.helloejbjar.HelloRemoteIF - java:global/ejb3_common_helloejbjar_standalone_component_ejb/HelloBean!com.sun.ts.tests.ejb30.common.helloejbjar.HelloRemoteIF - - - - java:app/env/AppResBean-remote - Session - com.sun.ts.tests.ejb30.assembly.appres.common.AppResRemoteIF - AppResBean - - - - java:app/env/AppResBean-local - Session - com.sun.ts.tests.ejb30.assembly.appres.common.AppResLocalIF - AppResBean - - - - java:app/env/db1 - javax.sql.DataSource - - - - java:app/env/validator - jakarta.validation.Validator - - - - java:app/env/validatorFactory - jakarta.validation.ValidatorFactory - - - - java:app/env/ut - jakarta.transaction.UserTransaction - - - java:app/env/sctx - jakarta.ejb.SessionContext - - - - test destination - java:app/env/receiveQueue - jakarta.jms.Queue - Consumes - MsgBeanOutQueue - - - - java:app/env/entityManager - - - - java:app/env/persistenceUnit - - - - MsgBeanOutQueue - - - - java:app/env/appds - java:app/env/appds - @className@ - @serverName@ - @portNumber@ - @databaseName@ - jdbc:xxxx://xxxx:1234 - @user@ - @password@ - @jdbc.datasource.props.xml@ - - x - y - - - y - x - - 500 - true - TRANSACTION_READ_COMMITTED - 2 - 5 - 1 - 500 - 100 - - - - java:global/env/ejb3_assembly_appres_warmbean/globalds - @className@ - @serverName@ - @portNumber@ - @databaseName@ - jdbc:xxxx://xxxx:1234 - @user@ - @password@ - @jdbc.datasource.props.xml@ - - x - y - - - y - x - - 500 - true - TRANSACTION_READ_COMMITTED - 2 - 5 - 1 - 500 - 100 - - - diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/appres/warmbean/build.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/appres/warmbean/build.xml deleted file mode 100644 index ac3aff4d44..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/appres/warmbean/build.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/appres/warmbean/ejb3_assembly_appres_warmbean.ear.sun-application.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/appres/warmbean/ejb3_assembly_appres_warmbean.ear.sun-application.xml deleted file mode 100644 index 8c87e0f013..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/appres/warmbean/ejb3_assembly_appres_warmbean.ear.sun-application.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - java:app/env/db1 - jdbc/DB1 - - user1 - password1 - - - - - MsgBeanOutQueue - MDB_QUEUE_REPLY - - diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/mbean/appclient/Client.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/mbean/appclient/Client.java deleted file mode 100644 index 3b2064aee2..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/mbean/appclient/Client.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.ejb30.assembly.mbean.appclient; - -import java.util.Properties; - -import com.sun.ts.lib.harness.Status; -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.tests.ejb30.assembly.appres.common.AppResCommonIF; -import com.sun.ts.tests.ejb30.common.helloejbjar.HelloRemoteIF; -import com.sun.ts.tests.ejb30.common.helper.Helper; - -import jakarta.annotation.PostConstruct; -import jakarta.annotation.Resource; -import jakarta.ejb.EJB; - -public class Client extends EETest { - private static StringBuilder postConstructRecords = new StringBuilder(); - - @Resource(type = OneManagedBean.class) - private static AppResCommonIF one; - - @Resource(lookup = "java:module/one-managed-bean") - private static OneManagedBean oneWithLookup; - - @Resource(name = "java:comp/env/two-managed-bean") - private static TwoManagedBean two; - - @Resource(lookup = "java:comp/env/two-managed-bean", type = TwoManagedBean.class) - private static AppResCommonIF twoWithLookup; - - @EJB(lookup = "java:module/env/hello") - private static HelloRemoteIF hello; - - public static void main(String[] args) { - Client theTests = new Client(); - Status s = theTests.run(args, System.out, System.err); - s.exit(); - } - - public void setup(String[] args, Properties p) { - } - - public void cleanup() { - } - - @SuppressWarnings("unused") - @PostConstruct - private static void postConstruct() { - Helper.assertEquals(null, OneManagedBean.NAME, one.getName(), - postConstructRecords); - Helper.assertEquals(null, OneManagedBean.NAME, oneWithLookup.getName(), - postConstructRecords); - Helper.assertEquals(null, TwoManagedBean.NAME, two.getName(), - postConstructRecords); - - Helper.assertEquals("Check injected hello ejb", 1 + 1, hello.add(1, 1), - postConstructRecords); - } - - /* - * @testName: clientPostConstruct - * - * @test_Strategy: managed beans packaged inside application client jar - */ - public void clientPostConstruct() { - Helper.getLogger().info(postConstructRecords.toString()); - } - - /* - * @testName: mbeanPostConstruct - * - * @test_Strategy: managed beans packaged inside application client jar - */ - public void mbeanPostConstruct() { - AppResCommonIF[] beans = { one, oneWithLookup, two, twoWithLookup }; - for (AppResCommonIF b : beans) { - Helper.getLogger().info(b.getPostConstructRecords().toString()); - } - } - -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/mbean/appclient/ClientTest.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/mbean/appclient/ClientTest.java deleted file mode 100644 index 30e89cb804..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/mbean/appclient/ClientTest.java +++ /dev/null @@ -1,153 +0,0 @@ -package com.sun.ts.tests.ejb30.assembly.mbean.appclient; - -import com.sun.ts.tests.ejb30.assembly.mbean.appclient.Client; -import java.net.URL; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.OperateOnDeployment; -import org.jboss.arquillian.container.test.api.OverProtocol; -import org.jboss.arquillian.container.test.api.TargetsContainer; -import org.jboss.arquillian.junit5.ArquillianExtension; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.StringAsset; -import org.jboss.shrinkwrap.api.exporter.ZipExporter; -import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.junit.jupiter.api.MethodOrderer; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestMethodOrder; -import org.junit.jupiter.api.extension.ExtendWith; -import tck.arquillian.porting.lib.spi.TestArchiveProcessor; -import tck.arquillian.protocol.common.TargetVehicle; - - - -@ExtendWith(ArquillianExtension.class) -@Tag("platform") -@Tag("ejb_3x_remote_optional") -@Tag("web_optional") -@Tag("tck-appclient") - -@TestMethodOrder(MethodOrderer.MethodName.class) -public class ClientTest extends com.sun.ts.tests.ejb30.assembly.mbean.appclient.Client { - @Deployment(name = "ejb3_common_helloejbjar_standalone_component", order = 1, testable = false) - public static JavaArchive createCommonDeployment() { - JavaArchive ejb3_common_helloejbjar_standalone_component_ejb = ShrinkWrap.create(JavaArchive.class, "ejb3_common_helloejbjar_standalone_component_ejb.jar"); - // The class files - ejb3_common_helloejbjar_standalone_component_ejb.addClasses( - com.sun.ts.tests.ejb30.common.helloejbjar.HelloCommonIF.class, - com.sun.ts.tests.ejb30.common.helloejbjar.HelloRemoteIF.class, - com.sun.ts.tests.ejb30.common.helloejbjar.HelloLocalIF.class, - com.sun.ts.tests.ejb30.common.helloejbjar.HelloBeanBase.class, - com.sun.ts.tests.ejb30.common.helloejbjar.HelloBean.class, - com.sun.ts.tests.ejb30.common.helper.TLogger.class - ); - URL ejbResURL = Client.class.getResource("/com/sun/ts/tests/ejb30/common/helloejbjar/ejb3_common_helloejbjar_standalone_component_ejb.jar.sun-ejb-jar.xml"); - if(ejbResURL != null) { - ejb3_common_helloejbjar_standalone_component_ejb.addAsManifestResource(ejbResURL, "sun-ejb-jar.xml"); - } - - return ejb3_common_helloejbjar_standalone_component_ejb; - } - - /** - EE10 Deployment Descriptors: - ejb3_assembly_mbean_appclient: - ejb3_assembly_mbean_appclient_client: - - Found Descriptors: - Client: - - Ear: - - */ - @TargetsContainer("tck-appclient") - @OverProtocol("appclient") - @Deployment(name = "ejb3_assembly_mbean_appclient", order = 2) - public static EnterpriseArchive createDeployment(@ArquillianResource TestArchiveProcessor archiveProcessor) { - // Client - // the jar with the correct archive name - JavaArchive ejb3_assembly_mbean_appclient_client = ShrinkWrap.create(JavaArchive.class, "ejb3_assembly_mbean_appclient_client.jar"); - // The class files - ejb3_assembly_mbean_appclient_client.addClasses( - com.sun.ts.tests.ejb30.assembly.mbean.appclient.OneManagedBean.class, - com.sun.ts.tests.ejb30.assembly.mbean.appclient.TwoManagedBean.class, - com.sun.ts.lib.harness.EETest.Fault.class, - com.sun.ts.lib.harness.EETest.class, - com.sun.ts.tests.ejb30.assembly.mbean.appclient.Client.class, - com.sun.ts.lib.harness.EETest.SetupException.class - ); - // The application-client.xml descriptor - URL resURL = Client.class.getResource("com/sun/ts/tests/ejb30/assembly/mbean/appclient/ejb3_assembly_mbean_appclient_client.xml"); - if(resURL != null) { - ejb3_assembly_mbean_appclient_client.addAsManifestResource(resURL, "application-client.xml"); - } - // The sun-application-client.xml file need to be added or should this be in in the vendor Arquillian extension? - resURL = Client.class.getResource("/com/sun/ts/tests/ejb30/assembly/mbean/appclient/ejb3_assembly_mbean_appclient_client.jar.sun-application-client.xml"); - if(resURL != null) { - ejb3_assembly_mbean_appclient_client.addAsManifestResource(resURL, "application-client.xml"); - } - ejb3_assembly_mbean_appclient_client.addAsManifestResource(new StringAsset("Main-Class: " + Client.class.getName() + "\n"), "MANIFEST.MF"); - // Call the archive processor - archiveProcessor.processClientArchive(ejb3_assembly_mbean_appclient_client, Client.class, resURL); - - // Ear - EnterpriseArchive ejb3_assembly_mbean_appclient_ear = ShrinkWrap.create(EnterpriseArchive.class, "ejb3_assembly_mbean_appclient.ear"); - - // Any libraries added to the ear - URL libURL; - JavaArchive shared_lib = ShrinkWrap.create(JavaArchive.class, "shared.jar"); - // The class files - shared_lib.addClasses( - com.sun.ts.tests.ejb30.assembly.appres.common.AppResBeanBase.class, - com.sun.ts.tests.ejb30.common.helper.Helper.class, - com.sun.ts.tests.ejb30.assembly.appres.common.AppResCommonIF.class, - com.sun.ts.tests.ejb30.assembly.appres.common.AppResTest.class, - com.sun.ts.tests.ejb30.common.helloejbjar.HelloCommonIF.class, - com.sun.ts.tests.ejb30.common.helloejbjar.HelloLocalIF.class, - com.sun.ts.tests.ejb30.common.helper.ServiceLocator.class, - com.sun.ts.tests.ejb30.common.helloejbjar.HelloRemoteIF.class - ); - - - ejb3_assembly_mbean_appclient_ear.addAsLibrary(shared_lib); - - - // The component jars built by the package target - ejb3_assembly_mbean_appclient_ear.addAsModule(ejb3_assembly_mbean_appclient_client); - - - - // The application.xml descriptor - URL earResURL = Client.class.getResource("/com/sun/ts/tests/ejb30/assembly/mbean/appclient/application.xml"); - if(earResURL != null) { - ejb3_assembly_mbean_appclient_ear.addAsManifestResource(earResURL, "application.xml"); - } - // The sun-application.xml descriptor - earResURL = Client.class.getResource("/com/sun/ts/tests/ejb30/assembly/mbean/appclient/application.ear.sun-application.xml"); - if(earResURL != null) { - ejb3_assembly_mbean_appclient_ear.addAsManifestResource(earResURL, "sun-application.xml"); - } - // Call the archive processor - archiveProcessor.processEarArchive(ejb3_assembly_mbean_appclient_ear, Client.class, earResURL); - return ejb3_assembly_mbean_appclient_ear; - } - - @Test - @Override - @OperateOnDeployment("ejb3_assembly_mbean_appclient") - public void clientPostConstruct() { - super.clientPostConstruct(); - } - - @Test - @Override - @OperateOnDeployment("ejb3_assembly_mbean_appclient") - public void mbeanPostConstruct() { - super.mbeanPostConstruct(); - } - - -} \ No newline at end of file diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/mbean/appclient/OneManagedBean.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/mbean/appclient/OneManagedBean.java deleted file mode 100644 index 7ad0cd579c..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/mbean/appclient/OneManagedBean.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.assembly.mbean.appclient; - -import com.sun.ts.tests.ejb30.assembly.appres.common.AppResBeanBase; -import com.sun.ts.tests.ejb30.assembly.appres.common.AppResTest; -import com.sun.ts.tests.ejb30.common.helloejbjar.HelloRemoteIF; -import com.sun.ts.tests.ejb30.common.helper.Helper; - -import jakarta.annotation.ManagedBean; -import jakarta.annotation.PostConstruct; -import jakarta.annotation.Resource; -import jakarta.ejb.EJB; - -@ManagedBean("one-managed-bean") -public class OneManagedBean extends AppResBeanBase { - public static final String NAME = "one-managed-bean"; - - @EJB(name = "java:module/env/hello", lookup = "java:global/ejb3_common_helloejbjar_standalone_component_ejb/HelloBean!com.sun.ts.tests.ejb30.common.helloejbjar.HelloRemoteIF") - private HelloRemoteIF hello; - - @SuppressWarnings("unused") - @PostConstruct - private void postConstruct() { - AppResTest.verifyInjections(getPostConstructRecords(), hello); - Helper.assertEquals(null, "ejb3_assembly_mbean_appclient", myString, - getPostConstructRecords()); - } - - @SuppressWarnings("unused") - @Resource(lookup = "java:app/AppName") - private void setMyString(String s) { - this.myString = s; - } - - @Override - public String getName() { - return NAME; - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/mbean/appclient/TwoManagedBean.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/mbean/appclient/TwoManagedBean.java deleted file mode 100644 index 3a89fa6493..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/mbean/appclient/TwoManagedBean.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.assembly.mbean.appclient; - -import com.sun.ts.tests.ejb30.assembly.appres.common.AppResBeanBase; -import com.sun.ts.tests.ejb30.assembly.appres.common.AppResTest; -import com.sun.ts.tests.ejb30.common.helloejbjar.HelloRemoteIF; -import com.sun.ts.tests.ejb30.common.helper.Helper; - -import jakarta.annotation.ManagedBean; -import jakarta.annotation.PostConstruct; -import jakarta.annotation.Resource; -import jakarta.ejb.EJB; - -@ManagedBean -public class TwoManagedBean extends AppResBeanBase { - public static final String NAME = "TwoManagedBean"; - - @EJB(lookup = "java:module/env/hello") - private HelloRemoteIF hello; - - @SuppressWarnings("unused") - @PostConstruct - private void postConstruct() { - AppResTest.verifyInjections(getPostConstructRecords(), hello); - Helper.assertEquals(null, "ejb3_assembly_mbean_appclient_client", myString, - getPostConstructRecords()); - } - - @SuppressWarnings("unused") - @Resource(lookup = "java:module/ModuleName") - private void setMyString(String s) { - this.myString = s; - } - - @Override - public String getName() { - return NAME; - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/mbean/appclient/build.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/mbean/appclient/build.xml deleted file mode 100644 index ee989b16cf..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/mbean/appclient/build.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/mbean/build.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/mbean/build.xml deleted file mode 100644 index aeb4310560..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/assembly/mbean/build.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/datasource/singleton/Client.java.template b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/datasource/singleton/Client.java.template index e1331ca33d..f812939ec0 100644 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/datasource/singleton/Client.java.template +++ b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/datasource/singleton/Client.java.template @@ -1,5 +1,6 @@ /* * Copyright (c) 2009, 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024 Contributors to the Eclipse Foundation * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -70,12 +71,6 @@ public class Client extends EJBLiteClientBase { @EJB private DataSourceIF dataSourceBean; - @Resource - private DataSourceMBean dataSourceMBean; - - @Resource - private DataSourceRepeatableBean dataSourceRBean; - @Resource(lookup="java:comp/env/compds") private DataSource compds; @@ -88,12 +83,6 @@ public class Client extends EJBLiteClientBase { @Resource(lookup="java:comp/env/defaultds2") private DataSource defaultds2; - @Resource(lookup="java:module/env/moduleds") - private DataSource moduleds; - - @Resource(lookup="java:module/env/moduleds2") - private DataSource moduleds2; - @SuppressWarnings("unused") @PostConstruct private void postConstruct() { @@ -101,9 +90,8 @@ public class Client extends EJBLiteClientBase { Helper.getLogger().info("In postConstruct of " + this); verifyDataSource(getReasonBuffer(), c, "java:comp/env/defaultds", "java:comp/env/defaultds2", - "java:comp/env/compds", "java:comp/env/compds2", - "java:module/env/moduleds", "java:module/env/moduleds2"); - verifyDataSource(getReasonBuffer(), c, defaultds, defaultds2, compds, compds2, moduleds, moduleds2); + "java:comp/env/compds", "java:comp/env/compds2"); + verifyDataSource(getReasonBuffer(), c, defaultds, defaultds2, compds, compds2); verifyDataSource(getReasonBuffer(), c, compds, compds2); } @@ -126,24 +114,6 @@ public class Client extends EJBLiteClientBase { appendReason(dataSourceBean.getPostConstructRecords()); } - /* - * @testName: postConstructRecordsMBean - * @test_Strategy: look up the data sources declared with annotation in managed bean, - * and verify the injected datasource inside its PostConstruct method. - */ - public void postConstructRecordsMBean() { - appendReason(dataSourceMBean.getPostConstructRecords()); - } - - /* - * @testName: postConstructRecordsMBeanRepeatable - * @test_Strategy: look up the data sources declared with repeatable annotation in managed bean, - * and verify the injected datasource inside its PostConstruct method. - */ - public void postConstructRecordsMBeanRepeatable() { - appendReason(dataSourceRBean.getPostConstructRecords()); - } - /* * @testName: getConnectionEJB * @test_Strategy: call getConnection() on the datasource diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/datasource/singleton/DataSourceBean.java.template b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/datasource/singleton/DataSourceBean.java.template index cf99a14ada..7840538a76 100644 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/datasource/singleton/DataSourceBean.java.template +++ b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/datasource/singleton/DataSourceBean.java.template @@ -1,5 +1,6 @@ /* * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024 Contributors to the Eclipse Foundation * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -73,12 +74,6 @@ public class DataSourceBean extends ComponentBase { @Resource(lookup="java:comp/env/defaultds2") private DataSource defaultds2; - @Resource(lookup="java:module/env/moduleds") - private DataSource moduleds; - - @Resource(lookup="java:module/env/moduleds2") - private DataSource moduleds2; - @Resource private UserTransaction ut; @@ -89,9 +84,8 @@ public class DataSourceBean extends ComponentBase { getPostConstructRecords().append(String.format("In postConstruct of %s%n", this)); verifyDataSource(getPostConstructRecords(), c, "java:comp/env/defaultds", "java:comp/env/defaultds2", - "java:comp/env/compds", "java:comp/env/compds2", - "java:module/env/moduleds", "java:module/env/moduleds2"); - verifyDataSource(getPostConstructRecords(), c, defaultds, defaultds2, compds, compds2, moduleds, moduleds2); + "java:comp/env/compds", "java:comp/env/compds2"); + verifyDataSource(getPostConstructRecords(), c, defaultds, defaultds2, compds, compds2); verifyDataSource(getPostConstructRecords(), c, defaultds, defaultds2); } diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/datasource/singleton/DataSourceMBean.java.template b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/datasource/singleton/DataSourceMBean.java.template deleted file mode 100644 index 58d95af8a2..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/datasource/singleton/DataSourceMBean.java.template +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.lite.packaging.war.datasource.singleton; - -import static com.sun.ts.tests.ejb30.lite.packaging.war.datasource.common.DataSourceTest.verifyDataSource; - -import jakarta.annotation.ManagedBean; -import jakarta.annotation.PostConstruct; -import jakarta.annotation.Resource; -import jakarta.annotation.sql.DataSourceDefinition; -import jakarta.annotation.sql.DataSourceDefinitions; -import javax.sql.DataSource; - -import com.sun.ts.tests.ejb30.lite.packaging.war.datasource.common.ComponentBase; - -@ManagedBean -@DataSourceDefinitions({ - @DataSourceDefinition(name="java:module/env/moduleds", - className="@className@", - portNumber=@portNumber@, - serverName="@serverName@", - databaseName="@databaseName@", - user="@user@", - transactional=false, - properties={@jdbc.datasource.props@}, - password="@password@" - ), - @DataSourceDefinition(name="java:module/env/moduleds2", - className="@className@", - portNumber=@portNumber@, - serverName="@serverName@", - databaseName="@databaseName@", - user="@user@", - transactional=false, - properties={@jdbc.datasource.props@}, - password="@password@" - ) - }) -public class DataSourceMBean extends ComponentBase { - @Resource(lookup="java:comp/env/compds") - private DataSource compds; - - @Resource(lookup="java:comp/env/compds2") - private DataSource compds2; - - @Resource(lookup="java:comp/env/defaultds") - private DataSource defaultds; - - @Resource(lookup="java:comp/env/defaultds2") - private DataSource defaultds2; - - @Resource(lookup="java:module/env/moduleds") - private DataSource moduleds; - - @Resource(lookup="java:module/env/moduleds2") - private DataSource moduleds2; - - - @SuppressWarnings("unused") - @PostConstruct - private void postConstruct() { - boolean c = true; - getPostConstructRecords().append(String.format("In postConstruct of %s%n", this)); - - verifyDataSource(getPostConstructRecords(), c, "java:comp/env/defaultds", "java:comp/env/defaultds2", - "java:comp/env/compds", "java:comp/env/compds2", - "java:module/env/moduleds", "java:module/env/moduleds2"); - verifyDataSource(getPostConstructRecords(), c, defaultds, defaultds2, compds, compds2, moduleds, moduleds2); - - verifyDataSource(getPostConstructRecords(), c, moduleds, moduleds2); - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/datasource/singleton/DataSourceRepeatableBean.java.template b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/datasource/singleton/DataSourceRepeatableBean.java.template deleted file mode 100644 index f08b353322..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/datasource/singleton/DataSourceRepeatableBean.java.template +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.lite.packaging.war.datasource.singleton; - -import static com.sun.ts.tests.ejb30.lite.packaging.war.datasource.common.DataSourceTest.verifyDataSource; - -import jakarta.annotation.sql.DataSourceDefinition; -import jakarta.annotation.sql.DataSourceDefinitions; -import jakarta.annotation.PostConstruct; -import jakarta.annotation.Resource; -import jakarta.ejb.Local; -import jakarta.ejb.Singleton; -import jakarta.ejb.TransactionManagement; -import jakarta.ejb.TransactionManagementType; -import javax.sql.DataSource; -import jakarta.transaction.UserTransaction; -import jakarta.annotation.ManagedBean; - -import com.sun.ts.tests.ejb30.lite.packaging.war.datasource.common.DataSourceIF; -import com.sun.ts.tests.ejb30.lite.packaging.war.datasource.common.ComponentBase; - -@ManagedBean -@DataSourceDefinition(name="defaultdsrepeatable", - className="@className@", - portNumber=@portNumber@, - serverName="@serverName@", - databaseName="@databaseName@", - user="@user@", - password="@password@", - transactional=false, - properties={@jdbc.datasource.props@} -) -@DataSourceDefinition(name="defaultdsrepeatable1", - className="@className@", - portNumber=@portNumber@, - serverName="@serverName@", - databaseName="@databaseName@", - user="@user@", - transactional=false, - password="@password@", - properties={@jdbc.datasource.props@} -) - -public class DataSourceRepeatableBean extends ComponentBase { - - @Resource(lookup="java:comp/env/defaultdsrepeatable") - private DataSource defaultdsrepeatable; - - @Resource(lookup="java:comp/env/defaultdsrepeatable1") - private DataSource defaultdsrepeatable1; - - @Resource - private UserTransaction ut; - - @SuppressWarnings("unused") - @PostConstruct - private void postConstruct() { - boolean c = true; - getPostConstructRecords().append(String.format("In postConstruct of %s%n", this)); - - verifyDataSource(getPostConstructRecords(), c, "java:comp/env/defaultdsrepeatable", "java:comp/env/defaultdsrepeatable1"); - verifyDataSource(getPostConstructRecords(), c, defaultdsrepeatable, defaultdsrepeatable1); - } - - @Override - public StringBuilder getConnection() { - int j = 2; - StringBuilder sb = new StringBuilder(); - try { - ut.begin(); - for(int i = 0; i < j; i++) { - verifyDataSource(getPostConstructRecords(), true, defaultdsrepeatable); - verifyDataSource(getPostConstructRecords(), true, defaultdsrepeatable1); - } - ut.commit(); - } catch (Exception e) { - throw new RuntimeException(e); - } - return sb; - } - -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/datasource/singleton/JsfClient.java.template b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/datasource/singleton/JsfClient.java.template index 3dae28a616..42c8cf3683 100644 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/datasource/singleton/JsfClient.java.template +++ b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/datasource/singleton/JsfClient.java.template @@ -1,5 +1,6 @@ /* * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024 Contributors to the Eclipse Foundation * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -76,12 +77,6 @@ public class JsfClient extends EJBLiteJsfClientBase implements Serializable { @EJB private DataSourceIF dataSourceBean; - @Resource - private DataSourceMBean dataSourceMBean; - - @Resource - private DataSourceRepeatableBean dataSourceRBean; - @Resource(lookup="java:comp/env/jsfcompds") private DataSource jsfcompds; @@ -94,12 +89,6 @@ public class JsfClient extends EJBLiteJsfClientBase implements Serializable { @Resource(lookup="java:comp/env/defaultds2") private DataSource defaultds2; - @Resource(lookup="java:module/env/moduleds") - private DataSource moduleds; - - @Resource(lookup="java:module/env/moduleds2") - private DataSource moduleds2; - @SuppressWarnings("unused") @PostConstruct private void postConstruct() { @@ -107,9 +96,8 @@ public class JsfClient extends EJBLiteJsfClientBase implements Serializable { Helper.getLogger().info("In postConstruct of " + this); verifyDataSource(getReasonBuffer(), c, "java:comp/env/defaultds", "java:comp/env/defaultds2", - "java:comp/env/jsfcompds", "java:comp/env/jsfcompds2", - "java:module/env/moduleds", "java:module/env/moduleds2"); - verifyDataSource(getReasonBuffer(), c, defaultds, defaultds2, jsfcompds, jsfcompds2, moduleds, moduleds2); + "java:comp/env/jsfcompds", "java:comp/env/jsfcompds2"); + verifyDataSource(getReasonBuffer(), c, defaultds, defaultds2, jsfcompds, jsfcompds2); verifyDataSource(getReasonBuffer(), c, jsfcompds, jsfcompds2); } @@ -132,24 +120,6 @@ public class JsfClient extends EJBLiteJsfClientBase implements Serializable { appendReason(dataSourceBean.getPostConstructRecords()); } - /* - * @testName: postConstructRecordsMBean - * @test_Strategy: look up the data sources declared with annotation in managed bean, - * and verify the injected datasource inside its PostConstruct method. - */ - public void postConstructRecordsMBean() { - appendReason(dataSourceMBean.getPostConstructRecords()); - } - - /* - * @testName: postConstructRecordsMBeanRepeatable - * @test_Strategy: look up the data sources declared with repeatable annotation in managed bean, - * and verify the injected datasource inside its PostConstruct method. - */ - public void postConstructRecordsMBeanRepeatable() { - appendReason(dataSourceRBean.getPostConstructRecords()); - } - /* * @testName: getConnectionEJB * @test_Strategy: call getConnection() on the datasource diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/Client.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/Client.java deleted file mode 100644 index 0ff723918b..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/Client.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business; - -import java.util.ArrayList; -import java.util.List; - -import com.sun.ts.tests.ejb30.common.helper.Helper; -import com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorIF; - -import jakarta.annotation.Resource; - -public class Client - extends com.sun.ts.tests.ejb30.lite.interceptor.common.business.ClientBase { - - // @Resource(lookup = "java:module/InterceptorBean") - @Resource - private InterceptorBean bean; - - // @Resource(lookup = "java:module/InterceptorOverrideBean") - @Resource - private InterceptorOverrideBean overrideBean; - - // @Resource(lookup = "java:module/InterceptorOverride34Bean") - @Resource - private InterceptorOverride34Bean override34Bean; - - @Override - protected InterceptorIF getBean() { - return bean; - } - - @Override - protected InterceptorIF getOverride34Bean() { - return override34Bean; - } - - @Override - protected InterceptorIF getOverrideBean() { - return overrideBean; - } - - /* - * @testName: allInterceptors - * - * @test_Strategy: all interceptors (Interceptor1-7) at default, class-level, - * and method-level should be invoked, as well as AroundInvoke methods on bean - * class. - */ - /* - * @testName: excludeDefaultInterceptors - * - * @test_Strategy: all interceptors except default interceptors should be - * invoked in the correct order. - */ - @Override - public void excludeDefaultInterceptors() { - List history = new ArrayList(); - String[] expected = { - // default interceptors - "InterceptorBaseBase", "InterceptorBase", "Interceptor2", - "InterceptorBaseBase", "InterceptorBase", "Interceptor1", - "InterceptorBaseBase", "InterceptorBase", "Interceptor3", - - // class-level interceptors - "InterceptorBaseBase", "InterceptorBase", "Interceptor5", - "InterceptorBaseBase", "InterceptorBase", "Interceptor4", - - // method-level interceptors - "InterceptorBaseBase", "InterceptorBase", "Interceptor6", - "InterceptorBaseBase", "InterceptorBase", "Interceptor7", - - // AroundInvoke methods on bean superclass and bean class - "InterceptorBeanBase", "InterceptorBean" }; - getBean().excludeDefaultInterceptors(history); - appendReason(Helper.compareResultList(expected, history)); - } - - /* - * @testName: excludeClassInterceptors - * - * @test_Strategy: all interceptors except class interceptors should be - * invoked in the correct order. - */ - @Override - public void excludeClassInterceptors() { - List history = new ArrayList(); - String[] expected = { - // no default interceptors, no class interceptors - - // method-level interceptors - "InterceptorBaseBase", "InterceptorBase", "Interceptor6", - "InterceptorBaseBase", "InterceptorBase", "Interceptor7", - - // AroundInvoke methods on bean superclass and bean class - "InterceptorBeanBase", "InterceptorBean" }; - getBean().excludeClassInterceptors(history); - appendReason(Helper.compareResultList(expected, history)); - } - - /* - * @testName: overrideInterceptorMethod - * - * @test_Strategy: If an interceptor method is overridden, it is no longer - * invoked, whether the overriding method is an interceptor method or not. - * This test also excludes default and class-level interceptors. - */ - /* - * @testName: overrideBeanInterceptorMethod - * - * @test_Strategy: If an interceptor method is overridden, it is no longer - * invoked. This test override with a non-interceptor method. This test also - * excludes default and class-level interceptors. - */ - /* - * @testName: overrideBeanInterceptorMethod2 - * - * @test_Strategy: If an interceptor method is overridden, it is no longer - * invoked. This test override with a non-interceptor method. This test also - * excludes default and declares no class-level interceptors. - */ - /* - * @testName: overrideBeanInterceptorMethod3 - * - * @test_Strategy: If an interceptor method is overridden, it is no longer - * invoked. This test override with an interceptor method. - */ - /* - * @testName: overrideBeanInterceptorMethod4 - * - * @test_Strategy: If an interceptor method is overridden, it is no longer - * invoked. This test override with an interceptor method. - */ - /* - * @testName: skipProceed - * - * @test_Strategy: - */ -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/ClientEjblitejspTest.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/ClientEjblitejspTest.java deleted file mode 100644 index ba837e3ba6..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/ClientEjblitejspTest.java +++ /dev/null @@ -1,196 +0,0 @@ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business; - -import com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.Client; -import java.net.URL; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.OperateOnDeployment; -import org.jboss.arquillian.container.test.api.OverProtocol; -import org.jboss.arquillian.container.test.api.TargetsContainer; -import org.jboss.arquillian.junit5.ArquillianExtension; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.StringAsset; -import org.jboss.shrinkwrap.api.exporter.ZipExporter; -import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.junit.jupiter.api.MethodOrderer; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestMethodOrder; -import org.junit.jupiter.api.extension.ExtendWith; -import tck.arquillian.porting.lib.spi.TestArchiveProcessor; -import tck.arquillian.protocol.common.TargetVehicle; - - - -@ExtendWith(ArquillianExtension.class) -@Tag("platform") -@Tag("ejb_web") -@Tag("web") -@Tag("tck-javatest") - -@TestMethodOrder(MethodOrderer.MethodName.class) -public class ClientEjblitejspTest extends com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.Client { - static final String VEHICLE_ARCHIVE = "ejblite_packaging_war_mbean_interceptor_business_ejblitejsp_vehicle"; - - /** - EE10 Deployment Descriptors: - ejblite_packaging_war_mbean_interceptor_business_ejblitejsf_vehicle_web: WEB-INF/beans.xml,WEB-INF/faces-config.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_business_ejblitejsp_vehicle_web: - ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet_vehicle_web: WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet2_vehicle_web: WEB-INF/web.xml - - Found Descriptors: - War: - - */ - @TargetsContainer("tck-javatest") - @OverProtocol("javatest") - @Deployment(name = VEHICLE_ARCHIVE, order = 2) - public static WebArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) { - - // War - // the war with the correct archive name - WebArchive ejblite_packaging_war_mbean_interceptor_business_ejblitejsp_vehicle_web = ShrinkWrap.create(WebArchive.class, "ejblite_packaging_war_mbean_interceptor_business_ejblitejsp_vehicle_web.war"); - // The class files - ejblite_packaging_war_mbean_interceptor_business_ejblitejsp_vehicle_web.addClasses( - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor5.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.InterceptorOverride34Bean.class, - com.sun.ts.lib.harness.EETest.Fault.class, - com.sun.ts.tests.ejb30.common.appexception.AtCheckedRollbackAppException.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor3.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.JsfClientBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.HttpServletDelegate.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorIF.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.EJBLiteJSPTag.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor2.class, - com.sun.ts.tests.common.vehicle.VehicleRunnable.class, - com.sun.ts.tests.ejb30.common.helper.Helper.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor7.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteClientBase.class, - com.sun.ts.lib.harness.EETest.class, - com.sun.ts.lib.harness.ServiceEETest.class, - com.sun.ts.tests.common.vehicle.VehicleClient.class, - com.sun.ts.tests.ejb30.common.lite.NumberIF.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteClientIF.class, - com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.ReasonableStatus.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor4.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.JsfClient.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorBaseBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor8.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.InterceptorBean.class, - com.sun.ts.tests.ejb30.common.lite.NumberEnum.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorBeanBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorOverrideBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.TestBean.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.Client.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.ClientBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor9.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorBase.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteJsfClientBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.InterceptorOverrideBean.class, - com.sun.ts.tests.ejb30.common.helper.ServiceLocator.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor1.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor6.class, - com.sun.ts.lib.harness.EETest.SetupException.class - ); - // The web.xml descriptor - URL warResURL = Client.class.getResource("/vehicle/ejblitejsp/ejblitejsp_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_business_ejblitejsp_vehicle_web.addAsWebInfResource(warResURL, "web.xml"); - } - // The sun-web.xml descriptor - warResURL = Client.class.getResource("//vehicle/ejblitejsp/ejblitejsp_vehicle_web.war.sun-web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_business_ejblitejsp_vehicle_web.addAsWebInfResource(warResURL, "sun-web.xml"); - } - - // Any libraries added to the war - - // Web content - warResURL = Client.class.getResource("/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/ejblitejsp.tld"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_business_ejblitejsp_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/tlds/ejblitejsp.tld"); - } - warResURL = Client.class.getResource("/com/sun/ts/tests/common/vehicle/ejblitejsp/ejblitejsp.tld"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_business_ejblitejsp_vehicle_web.addAsWebResource(warResURL, "/ejblitejsp.tld"); - } - warResURL = Client.class.getResource("/com/sun/ts/tests/common/vehicle/ejblitejsp/ejblitejsp_vehicle.jsp"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_business_ejblitejsp_vehicle_web.addAsWebResource(warResURL, "/ejblitejsp_vehicle.jsp"); - } - - // Call the archive processor - archiveProcessor.processWebArchive(ejblite_packaging_war_mbean_interceptor_business_ejblitejsp_vehicle_web, Client.class, warResURL); - - return ejblite_packaging_war_mbean_interceptor_business_ejblitejsp_vehicle_web; - } - - @Test - @Override - @TargetVehicle("ejblitejsp") - public void allInterceptors() { - super.allInterceptors(); - } - - @Test - @Override - @TargetVehicle("ejblitejsp") - public void excludeDefaultInterceptors() { - super.excludeDefaultInterceptors(); - } - - @Test - @Override - @TargetVehicle("ejblitejsp") - public void excludeClassInterceptors() { - super.excludeClassInterceptors(); - } - - @Test - @Override - @TargetVehicle("ejblitejsp") - public void overrideInterceptorMethod() { - super.overrideInterceptorMethod(); - } - - @Test - @Override - @TargetVehicle("ejblitejsp") - public void overrideBeanInterceptorMethod() { - super.overrideBeanInterceptorMethod(); - } - - @Test - @Override - @TargetVehicle("ejblitejsp") - public void overrideBeanInterceptorMethod2() { - super.overrideBeanInterceptorMethod2(); - } - - @Test - @Override - @TargetVehicle("ejblitejsp") - public void overrideBeanInterceptorMethod3() { - super.overrideBeanInterceptorMethod3(); - } - - @Test - @Override - @TargetVehicle("ejblitejsp") - public void overrideBeanInterceptorMethod4() { - super.overrideBeanInterceptorMethod4(); - } - - @Test - @Override - @TargetVehicle("ejblitejsp") - public void skipProceed() { - super.skipProceed(); - } - - -} \ No newline at end of file diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/ClientEjbliteservlet2Test.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/ClientEjbliteservlet2Test.java deleted file mode 100644 index 711294fa88..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/ClientEjbliteservlet2Test.java +++ /dev/null @@ -1,193 +0,0 @@ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business; - -import com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.Client; -import java.net.URL; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.OperateOnDeployment; -import org.jboss.arquillian.container.test.api.OverProtocol; -import org.jboss.arquillian.container.test.api.TargetsContainer; -import org.jboss.arquillian.junit5.ArquillianExtension; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.StringAsset; -import org.jboss.shrinkwrap.api.exporter.ZipExporter; -import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.junit.jupiter.api.MethodOrderer; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestMethodOrder; -import org.junit.jupiter.api.extension.ExtendWith; -import tck.arquillian.porting.lib.spi.TestArchiveProcessor; -import tck.arquillian.protocol.common.TargetVehicle; - - - -@ExtendWith(ArquillianExtension.class) -@Tag("platform") -@Tag("ejb_web") -@Tag("web") -@Tag("tck-javatest") - -@TestMethodOrder(MethodOrderer.MethodName.class) -public class ClientEjbliteservlet2Test extends com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.Client { - static final String VEHICLE_ARCHIVE = "ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet2_vehicle"; - - /** - EE10 Deployment Descriptors: - ejblite_packaging_war_mbean_interceptor_business_ejblitejsf_vehicle_web: WEB-INF/beans.xml,WEB-INF/faces-config.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_business_ejblitejsp_vehicle_web: - ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet_vehicle_web: WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet2_vehicle_web: WEB-INF/web.xml - - Found Descriptors: - War: - - /com/sun/ts/tests/common/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle_web.xml - */ - @TargetsContainer("tck-javatest") - @OverProtocol("javatest") - @Deployment(name = VEHICLE_ARCHIVE, order = 2) - public static WebArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) { - - // War - // the war with the correct archive name - WebArchive ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet2_vehicle_web = ShrinkWrap.create(WebArchive.class, "ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet2_vehicle_web.war"); - // The class files - ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet2_vehicle_web.addClasses( - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor5.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.InterceptorOverride34Bean.class, - com.sun.ts.lib.harness.EETest.Fault.class, - com.sun.ts.tests.ejb30.common.appexception.AtCheckedRollbackAppException.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor3.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.JsfClientBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.HttpServletDelegate.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorIF.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor2.class, - com.sun.ts.tests.common.vehicle.VehicleRunnable.class, - com.sun.ts.tests.ejb30.common.helper.Helper.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor7.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteClientBase.class, - com.sun.ts.lib.harness.EETest.class, - com.sun.ts.lib.harness.ServiceEETest.class, - com.sun.ts.tests.common.vehicle.VehicleClient.class, - com.sun.ts.tests.ejb30.common.lite.NumberIF.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteClientIF.class, - com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.EJBLiteServlet2Filter.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.ReasonableStatus.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor4.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.JsfClient.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorBaseBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor8.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.InterceptorBean.class, - com.sun.ts.tests.ejb30.common.lite.NumberEnum.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorBeanBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorOverrideBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.TestBean.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.Client.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.ClientBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor9.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorBase.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteJsfClientBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.InterceptorOverrideBean.class, - com.sun.ts.tests.ejb30.common.helper.ServiceLocator.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor1.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor6.class, - com.sun.ts.lib.harness.EETest.SetupException.class - ); - // The web.xml descriptor - URL warResURL = Client.class.getResource("ejbliteservlet2_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet2_vehicle_web.addAsWebInfResource(warResURL, "web.xml"); - } - // The sun-web.xml descriptor - warResURL = Client.class.getResource("/ejbliteservlet2_vehicle_web.war.sun-web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet2_vehicle_web.addAsWebInfResource(warResURL, "sun-web.xml"); - } - - // Any libraries added to the war - - // Web content - warResURL = Client.class.getResource("/com/sun/ts/tests/common/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet2_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/ejbliteservlet2_vehicle_web.xml"); - } - warResURL = Client.class.getResource("/com/sun/ts/tests/common/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle.jsp"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet2_vehicle_web.addAsWebResource(warResURL, "/ejbliteservlet2_vehicle.jsp"); - } - - // Call the archive processor - archiveProcessor.processWebArchive(ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet2_vehicle_web, Client.class, warResURL); - - return ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet2_vehicle_web; - } - - @Test - @Override - @TargetVehicle("ejbliteservlet2") - public void allInterceptors() { - super.allInterceptors(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet2") - public void excludeDefaultInterceptors() { - super.excludeDefaultInterceptors(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet2") - public void excludeClassInterceptors() { - super.excludeClassInterceptors(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet2") - public void overrideInterceptorMethod() { - super.overrideInterceptorMethod(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet2") - public void overrideBeanInterceptorMethod() { - super.overrideBeanInterceptorMethod(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet2") - public void overrideBeanInterceptorMethod2() { - super.overrideBeanInterceptorMethod2(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet2") - public void overrideBeanInterceptorMethod3() { - super.overrideBeanInterceptorMethod3(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet2") - public void overrideBeanInterceptorMethod4() { - super.overrideBeanInterceptorMethod4(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet2") - public void skipProceed() { - super.skipProceed(); - } - - -} \ No newline at end of file diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/ClientEjbliteservletTest.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/ClientEjbliteservletTest.java deleted file mode 100644 index d3a24991af..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/ClientEjbliteservletTest.java +++ /dev/null @@ -1,189 +0,0 @@ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business; - -import com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.Client; -import java.net.URL; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.OperateOnDeployment; -import org.jboss.arquillian.container.test.api.OverProtocol; -import org.jboss.arquillian.container.test.api.TargetsContainer; -import org.jboss.arquillian.junit5.ArquillianExtension; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.StringAsset; -import org.jboss.shrinkwrap.api.exporter.ZipExporter; -import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.junit.jupiter.api.MethodOrderer; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestMethodOrder; -import org.junit.jupiter.api.extension.ExtendWith; -import tck.arquillian.porting.lib.spi.TestArchiveProcessor; -import tck.arquillian.protocol.common.TargetVehicle; - - - -@ExtendWith(ArquillianExtension.class) -@Tag("platform") -@Tag("ejb_web") -@Tag("web") -@Tag("tck-javatest") - -@TestMethodOrder(MethodOrderer.MethodName.class) -public class ClientEjbliteservletTest extends com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.Client { - static final String VEHICLE_ARCHIVE = "ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet_vehicle"; - - /** - EE10 Deployment Descriptors: - ejblite_packaging_war_mbean_interceptor_business_ejblitejsf_vehicle_web: WEB-INF/beans.xml,WEB-INF/faces-config.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_business_ejblitejsp_vehicle_web: - ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet_vehicle_web: WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet2_vehicle_web: WEB-INF/web.xml - - Found Descriptors: - War: - - /com/sun/ts/tests/common/vehicle/ejbliteservlet/ejbliteservlet_vehicle_web.xml - */ - @TargetsContainer("tck-javatest") - @OverProtocol("javatest") - @Deployment(name = VEHICLE_ARCHIVE, order = 2) - public static WebArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) { - - // War - // the war with the correct archive name - WebArchive ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet_vehicle_web = ShrinkWrap.create(WebArchive.class, "ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet_vehicle_web.war"); - // The class files - ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet_vehicle_web.addClasses( - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor5.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.InterceptorOverride34Bean.class, - com.sun.ts.lib.harness.EETest.Fault.class, - com.sun.ts.tests.ejb30.common.appexception.AtCheckedRollbackAppException.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor3.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.JsfClientBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.HttpServletDelegate.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorIF.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor2.class, - com.sun.ts.tests.common.vehicle.VehicleRunnable.class, - com.sun.ts.tests.ejb30.common.helper.Helper.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor7.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.EJBLiteServletVehicle.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteClientBase.class, - com.sun.ts.lib.harness.EETest.class, - com.sun.ts.lib.harness.ServiceEETest.class, - com.sun.ts.tests.common.vehicle.VehicleClient.class, - com.sun.ts.tests.ejb30.common.lite.NumberIF.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteClientIF.class, - com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.ReasonableStatus.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor4.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.JsfClient.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorBaseBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor8.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.InterceptorBean.class, - com.sun.ts.tests.ejb30.common.lite.NumberEnum.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorBeanBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorOverrideBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.TestBean.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.Client.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.ClientBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor9.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorBase.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteJsfClientBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.InterceptorOverrideBean.class, - com.sun.ts.tests.ejb30.common.helper.ServiceLocator.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor1.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor6.class, - com.sun.ts.lib.harness.EETest.SetupException.class - ); - // The web.xml descriptor - URL warResURL = Client.class.getResource("ejbliteservlet_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet_vehicle_web.addAsWebInfResource(warResURL, "web.xml"); - } - // The sun-web.xml descriptor - warResURL = Client.class.getResource("/ejbliteservlet_vehicle_web.war.sun-web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet_vehicle_web.addAsWebInfResource(warResURL, "sun-web.xml"); - } - - // Any libraries added to the war - - // Web content - warResURL = Client.class.getResource("/com/sun/ts/tests/common/vehicle/ejbliteservlet/ejbliteservlet_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/ejbliteservlet_vehicle_web.xml"); - } - - // Call the archive processor - archiveProcessor.processWebArchive(ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet_vehicle_web, Client.class, warResURL); - - return ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet_vehicle_web; - } - - @Test - @Override - @TargetVehicle("ejbliteservlet") - public void allInterceptors() { - super.allInterceptors(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet") - public void excludeDefaultInterceptors() { - super.excludeDefaultInterceptors(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet") - public void excludeClassInterceptors() { - super.excludeClassInterceptors(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet") - public void overrideInterceptorMethod() { - super.overrideInterceptorMethod(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet") - public void overrideBeanInterceptorMethod() { - super.overrideBeanInterceptorMethod(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet") - public void overrideBeanInterceptorMethod2() { - super.overrideBeanInterceptorMethod2(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet") - public void overrideBeanInterceptorMethod3() { - super.overrideBeanInterceptorMethod3(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet") - public void overrideBeanInterceptorMethod4() { - super.overrideBeanInterceptorMethod4(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet") - public void skipProceed() { - super.skipProceed(); - } - - -} \ No newline at end of file diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/EJBLiteJSPTag.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/EJBLiteJSPTag.java deleted file mode 100644 index bb9a2b2bfc..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/EJBLiteJSPTag.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business; - -import jakarta.servlet.jsp.JspContext; -import jakarta.servlet.jsp.JspWriter; -import jakarta.servlet.jsp.JspException; -import jakarta.servlet.jsp.tagext.JspFragment; -import jakarta.servlet.jsp.tagext.JspTag; -import jakarta.servlet.jsp.PageContext; -import jakarta.servlet.jsp.tagext.SimpleTag; -import java.io.IOException; - -public class EJBLiteJSPTag extends Client implements SimpleTag { - /** Reference to the enclosing tag. */ - private JspTag parentTag; - - /** The JSP context for the upcoming tag invocation. */ - private JspContext jspContext; - - /** The body of the tag. */ - private JspFragment jspBody; - - /** - * Called by the container to invoke this tag. - * The implementation of this method is provided by the tag library developer, - * and handles all tag processing, body iteration, etc. - */ - public void doTag() throws JspException { - JspWriter out = getJspContext().getOut(); - setModuleName( - ((PageContext) getJspContext()).getServletContext().getContextPath() ); - String sta = getStatus(); //to trigger the test run - getJspContext().setAttribute("statusAndReason", sta + " " + getReason()); - JspFragment f = getJspBody(); - if (f != null) { - try { - f.invoke(out); - } catch (IOException e) { - throw new JspException(e); - } - } - } - - /** - * Sets the parent of this tag, for collaboration purposes. - *

- * The container invokes this method only if this tag invocation is - * nested within another tag invocation. - * - * @param parent the tag that encloses this tag - */ - public void setParent(JspTag parent) { - this.parentTag = parent; - } - - /** - * Returns the parent of this tag, for collaboration purposes. - * - * @return the parent of this tag - */ - public JspTag getParent() { - return this.parentTag; - } - - /** - * Stores the provided JSP context in the private jspContext field. - * Subclasses can access the JspContext via - * getJspContext(). - * - * @param pc the page context for this invocation - * @see SimpleTag#setJspContext - */ - public void setJspContext(JspContext pc) { - this.jspContext = pc; - } - - /** - * Returns the page context passed in by the container via - * setJspContext. - * - * @return the page context for this invocation - */ - protected JspContext getJspContext() { - return this.jspContext; - } - - /** - * Stores the provided JspFragment. - * - * @param jspBody The fragment encapsulating the body of this tag. - * If the action element is empty in the page, this method is - * not called at all. - * @see SimpleTag#setJspBody - */ - public void setJspBody(JspFragment jspBody) { - this.jspBody = jspBody; - } - - /** - * Returns the body passed in by the container via setJspBody. - * - * @return the fragment encapsulating the body of this tag, or - * null if the action element is empty in the page. - */ - protected JspFragment getJspBody() { - return this.jspBody; - } - -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/EJBLiteServlet2Filter.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/EJBLiteServlet2Filter.java deleted file mode 100644 index 2500f7fcea..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/EJBLiteServlet2Filter.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business; - -import java.io.IOException; -import java.io.PrintWriter; -import jakarta.servlet.Filter; -import jakarta.servlet.FilterChain; -import jakarta.servlet.FilterConfig; -import jakarta.servlet.ServletException; -import jakarta.servlet.ServletRequest; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.ServletResponse; -import java.util.logging.Logger; -import java.util.logging.Level; - -public class EJBLiteServlet2Filter extends Client implements Filter { - private static Logger logger = Logger.getLogger(EJBLiteServlet2Filter.class.getName()); - private FilterConfig filterConfig; - - public void doFilter(ServletRequest request, ServletResponse response, - FilterChain chain) - throws IOException, ServletException { - response.setContentType("text/plain"); - setInjectionSupported(true); - String tn = request.getParameter("testName"); - if(logger.isLoggable(Level.FINE)) { - logger.fine("doFilter testName=" + tn); - } - setTestName(tn); - setModuleName( ((HttpServletRequest) request).getContextPath() ); - String sta = getStatus(); //to trigger the test run - PrintWriter pw = response.getWriter(); - pw.println(sta + " " + getReason()); - cleanup(); //need to reset all fields since filter instances are shared - //skip the rest of the chain - } - - public void destroy() { - } - - public void init(FilterConfig filterConfig) { - this.filterConfig = filterConfig; - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/EJBLiteServletVehicle.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/EJBLiteServletVehicle.java deleted file mode 100644 index 0c99c34f20..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/EJBLiteServletVehicle.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business; - -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Enumeration; -import java.util.Iterator; -import jakarta.servlet.Servlet; -import jakarta.servlet.http.HttpServlet; -import jakarta.servlet.ServletContext; -import jakarta.servlet.ServletException; -import jakarta.servlet.ServletRequest; -import jakarta.servlet.ServletResponse; -import java.util.logging.Logger; -import java.util.logging.Level; -import jakarta.servlet.ServletConfig; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; - -public class EJBLiteServletVehicle extends Client - implements Servlet, ServletConfig { - - private static Logger logger = Logger.getLogger(EJBLiteServletVehicle.class.getName()); - - private HttpServletDelegate delegate = new HttpServletDelegate(); - - public void init(ServletConfig config) throws ServletException { - delegate.init(config); - } - - public ServletConfig getServletConfig() { - return delegate.getServletConfig(); - } - - public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException { - delegate.service(request, response); - - setInjectionSupported(true); - String tn = request.getParameter("testName"); - logger.fine("EJBLiteServletVehicle processing request testName=" + tn); - setTestName(tn); - setModuleName(getServletContext().getContextPath()); - String sta = getStatus(); //to trigger the test run - - PrintWriter pw = response.getWriter(); - pw.println(sta + " " + getReason()); - cleanup(); //need to reset all fields since servlet instances are shared - - } - - public String getServletInfo() { - return delegate.getServletInfo(); - } - - public void destroy() { - delegate.destroy(); - delegate = null; - } - - public String getServletName() { - return delegate.getServletName(); - } - - public ServletContext getServletContext() { - return delegate.getServletContext(); - } - - public String getInitParameter(String arg0) { - return delegate.getInitParameter(arg0); - } - - public Enumeration getInitParameterNames() { - return delegate.getInitParameterNames(); - } - - -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/HttpServletDelegate.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/HttpServletDelegate.java deleted file mode 100644 index 0d0c2aa1cf..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/HttpServletDelegate.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - - package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business; - -import java.io.IOException; -import java.io.PrintWriter; -import jakarta.servlet.ServletException; -import java.util.logging.Logger; -import java.util.logging.Level; -import jakarta.servlet.http.HttpServlet; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; - -public class HttpServletDelegate extends HttpServlet { - - private static Logger logger = Logger.getLogger(HttpServletDelegate.class.getName()); - - @Override - protected void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - processRequest(request, response); - } - - @Override - protected void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - processRequest(request, response); - } - - private void processRequest(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - response.setContentType("text/plain"); - } - } diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/InterceptorBean.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/InterceptorBean.java deleted file mode 100644 index 9da8df2d53..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/InterceptorBean.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 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business; - -import java.util.logging.Level; - -import com.sun.ts.tests.ejb30.common.helper.Helper; -import com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor1; -import com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor2; -import com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor3; -import com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor4; -import com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor5; -import com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorBaseBase; -import com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorBeanBase; -import com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorIF; - -import jakarta.annotation.ManagedBean; -import jakarta.interceptor.AroundInvoke; -import jakarta.interceptor.Interceptors; -import jakarta.interceptor.InvocationContext; - -@ManagedBean -@Interceptors({ Interceptor2.class, Interceptor1.class, Interceptor3.class, - Interceptor5.class, Interceptor4.class }) -public class InterceptorBean extends InterceptorBeanBase - implements InterceptorIF { - private static final String simpleName = "InterceptorBean"; - - @SuppressWarnings("unused") - @AroundInvoke - private Object intercep(InvocationContext inv) throws Exception { - Helper.getLogger().logp(Level.FINE, simpleName, "InterceptorBean", - "Adding around-invoke record: " + simpleName + ", this:" + this); - InterceptorBaseBase.addToHistory(inv, simpleName); - return inv.proceed(); - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/InterceptorOverride34Bean.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/InterceptorOverride34Bean.java deleted file mode 100644 index a1f872eaa1..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/InterceptorOverride34Bean.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business; - -import com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorBaseBase; -import com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorBeanBase; -import com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorIF; - -import jakarta.annotation.ManagedBean; -import jakarta.interceptor.AroundInvoke; -import jakarta.interceptor.ExcludeDefaultInterceptors; -import jakarta.interceptor.InvocationContext; - -@ManagedBean -@ExcludeDefaultInterceptors -public class InterceptorOverride34Bean extends InterceptorBeanBase - implements InterceptorIF { - private static final String simpleName = "InterceptorOverride34Bean"; - - @Override // override the superclass' interceptor method with an interceptor - // method - @AroundInvoke - protected Object intercepInInterceptorBeanBase(InvocationContext inv) - throws Exception { - // do not call super - InterceptorBaseBase.addToHistory(inv, simpleName); - return inv.proceed(); - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/InterceptorOverrideBean.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/InterceptorOverrideBean.java deleted file mode 100644 index b3279737e8..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/InterceptorOverrideBean.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business; - -import java.util.List; - -import com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor1; -import com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorBaseBase; -import com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorBeanBase; -import com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorIF; - -import jakarta.annotation.ManagedBean; -import jakarta.interceptor.AroundInvoke; -import jakarta.interceptor.ExcludeClassInterceptors; -import jakarta.interceptor.ExcludeDefaultInterceptors; -import jakarta.interceptor.Interceptors; -import jakarta.interceptor.InvocationContext; - -@ManagedBean -@ExcludeDefaultInterceptors -public class InterceptorOverrideBean extends InterceptorBeanBase - implements InterceptorIF { - - private static final String simpleName = "InterceptorOverrideBean"; - - @Override // override the superclass' interceptor method with a - // non-interceptor method - protected Object intercepInInterceptorBeanBase(InvocationContext inv) - throws Exception { - return super.intercepInInterceptorBeanBase(inv); - } - - @SuppressWarnings("unused") - @AroundInvoke - private Object intercep(InvocationContext inv) throws Exception { - InterceptorBaseBase.addToHistory(inv, simpleName); - return inv.proceed(); - } - - @Override - @Interceptors({ Interceptor1.class }) - // Interceptor1 is declared as a default interceptor in ejb-jar.xml, excluded - // at class-level, and then reinstated as a method-level interceptor - public void overrideBeanInterceptorMethod2(List history) { - super.overrideBeanInterceptorMethod2(history); - } - - @Override - @ExcludeClassInterceptors - // OK to exclude class interceptors, though there is no class interceptors - public void overrideInterceptorMethod(List history) { - super.overrideInterceptorMethod(history); - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/JsfClient.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/JsfClient.java deleted file mode 100644 index a0f624b5ef..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/JsfClient.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business; - -import java.util.ArrayList; -import java.util.List; -import java.io.Serializable; - -import com.sun.ts.tests.ejb30.common.helper.Helper; -import com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorIF; -import jakarta.annotation.Resource; - -@jakarta.inject.Named("client") -@jakarta.enterprise.context.RequestScoped -public class JsfClient - extends com.sun.ts.tests.ejb30.lite.interceptor.common.business.JsfClientBase implements Serializable { - - private static final long serialVersionUID = 1L; - - // @Resource(lookup = "java:module/InterceptorBean") - @Resource - private InterceptorBean bean; - - // @Resource(lookup = "java:module/InterceptorOverrideBean") - @Resource - private InterceptorOverrideBean overrideBean; - - // @Resource(lookup = "java:module/InterceptorOverride34Bean") - @Resource - private InterceptorOverride34Bean override34Bean; - - @Override - protected InterceptorIF getBean() { - return bean; - } - - @Override - protected InterceptorIF getOverride34Bean() { - return override34Bean; - } - - @Override - protected InterceptorIF getOverrideBean() { - return overrideBean; - } - - /* - * @testName: allInterceptors - * - * @test_Strategy: all interceptors (Interceptor1-7) at default, class-level, - * and method-level should be invoked, as well as AroundInvoke methods on bean - * class. - */ - /* - * @testName: excludeDefaultInterceptors - * - * @test_Strategy: all interceptors except default interceptors should be - * invoked in the correct order. - */ - @Override - public void excludeDefaultInterceptors() { - List history = new ArrayList(); - String[] expected = { - // default interceptors - "InterceptorBaseBase", "InterceptorBase", "Interceptor2", - "InterceptorBaseBase", "InterceptorBase", "Interceptor1", - "InterceptorBaseBase", "InterceptorBase", "Interceptor3", - - // class-level interceptors - "InterceptorBaseBase", "InterceptorBase", "Interceptor5", - "InterceptorBaseBase", "InterceptorBase", "Interceptor4", - - // method-level interceptors - "InterceptorBaseBase", "InterceptorBase", "Interceptor6", - "InterceptorBaseBase", "InterceptorBase", "Interceptor7", - - // AroundInvoke methods on bean superclass and bean class - "InterceptorBeanBase", "InterceptorBean" }; - getBean().excludeDefaultInterceptors(history); - appendReason(Helper.compareResultList(expected, history)); - } - - /* - * @testName: excludeClassInterceptors - * - * @test_Strategy: all interceptors except class interceptors should be - * invoked in the correct order. - */ - @Override - public void excludeClassInterceptors() { - List history = new ArrayList(); - String[] expected = { - // no default interceptors, no class interceptors - - // method-level interceptors - "InterceptorBaseBase", "InterceptorBase", "Interceptor6", - "InterceptorBaseBase", "InterceptorBase", "Interceptor7", - - // AroundInvoke methods on bean superclass and bean class - "InterceptorBeanBase", "InterceptorBean" }; - getBean().excludeClassInterceptors(history); - appendReason(Helper.compareResultList(expected, history)); - } - - /* - * @testName: overrideInterceptorMethod - * - * @test_Strategy: If an interceptor method is overridden, it is no longer - * invoked, whether the overriding method is an interceptor method or not. - * This test also excludes default and class-level interceptors. - */ - /* - * @testName: overrideBeanInterceptorMethod - * - * @test_Strategy: If an interceptor method is overridden, it is no longer - * invoked. This test override with a non-interceptor method. This test also - * excludes default and class-level interceptors. - */ - /* - * @testName: overrideBeanInterceptorMethod2 - * - * @test_Strategy: If an interceptor method is overridden, it is no longer - * invoked. This test override with a non-interceptor method. This test also - * excludes default and declares no class-level interceptors. - */ - /* - * @testName: overrideBeanInterceptorMethod3 - * - * @test_Strategy: If an interceptor method is overridden, it is no longer - * invoked. This test override with an interceptor method. - */ - /* - * @testName: overrideBeanInterceptorMethod4 - * - * @test_Strategy: If an interceptor method is overridden, it is no longer - * invoked. This test override with an interceptor method. - */ - /* - * @testName: skipProceed - * - * @test_Strategy: - */ -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/JsfClientEjblitejsfTest.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/JsfClientEjblitejsfTest.java deleted file mode 100644 index ed956e9bde..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/JsfClientEjblitejsfTest.java +++ /dev/null @@ -1,208 +0,0 @@ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business; - -import com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.JsfClient; -import java.net.URL; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.OperateOnDeployment; -import org.jboss.arquillian.container.test.api.OverProtocol; -import org.jboss.arquillian.container.test.api.TargetsContainer; -import org.jboss.arquillian.junit5.ArquillianExtension; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.StringAsset; -import org.jboss.shrinkwrap.api.exporter.ZipExporter; -import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.junit.jupiter.api.MethodOrderer; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestMethodOrder; -import org.junit.jupiter.api.extension.ExtendWith; -import tck.arquillian.porting.lib.spi.TestArchiveProcessor; -import tck.arquillian.protocol.common.TargetVehicle; - - - -@ExtendWith(ArquillianExtension.class) -@Tag("platform") -@Tag("ejb_web") -@Tag("web") -@Tag("tck-javatest") - -@TestMethodOrder(MethodOrderer.MethodName.class) -public class JsfClientEjblitejsfTest extends com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.JsfClient { - static final String VEHICLE_ARCHIVE = "ejblite_packaging_war_mbean_interceptor_business_ejblitejsf_vehicle"; - - /** - EE10 Deployment Descriptors: - ejblite_packaging_war_mbean_interceptor_business_ejblitejsf_vehicle_web: WEB-INF/beans.xml,WEB-INF/faces-config.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_business_ejblitejsp_vehicle_web: - ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet_vehicle_web: WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_business_ejbliteservlet2_vehicle_web: WEB-INF/web.xml - - Found Descriptors: - War: - - /com/sun/ts/tests/common/vehicle/ejblitejsf/ejblitejsf_vehicle_web.xml - */ - @TargetsContainer("tck-javatest") - @OverProtocol("javatest") - @Deployment(name = VEHICLE_ARCHIVE, order = 2) - public static WebArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) { - - // War - // the war with the correct archive name - WebArchive ejblite_packaging_war_mbean_interceptor_business_ejblitejsf_vehicle_web = ShrinkWrap.create(WebArchive.class, "ejblite_packaging_war_mbean_interceptor_business_ejblitejsf_vehicle_web.war"); - // The class files - ejblite_packaging_war_mbean_interceptor_business_ejblitejsf_vehicle_web.addClasses( - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor5.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.InterceptorOverride34Bean.class, - com.sun.ts.lib.harness.EETest.Fault.class, - com.sun.ts.tests.ejb30.common.appexception.AtCheckedRollbackAppException.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor3.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.JsfClientBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.HttpServletDelegate.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorIF.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor2.class, - com.sun.ts.tests.common.vehicle.VehicleRunnable.class, - com.sun.ts.tests.ejb30.common.helper.Helper.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor7.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteClientBase.class, - com.sun.ts.lib.harness.EETest.class, - com.sun.ts.lib.harness.ServiceEETest.class, - com.sun.ts.tests.common.vehicle.VehicleClient.class, - com.sun.ts.tests.ejb30.common.lite.NumberIF.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteClientIF.class, - com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.ReasonableStatus.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor4.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.JsfClient.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorBaseBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor8.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.InterceptorBean.class, - com.sun.ts.tests.ejb30.common.lite.NumberEnum.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorBeanBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorOverrideBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.TestBean.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.Client.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.ClientBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor9.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.InterceptorBase.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteJsfClientBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.InterceptorOverrideBean.class, - com.sun.ts.tests.ejb30.common.helper.ServiceLocator.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor1.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.business.Interceptor6.class, - com.sun.ts.lib.harness.EETest.SetupException.class - ); - // The web.xml descriptor - URL warResURL = JsfClient.class.getResource("/com/sun/ts/tests/common/vehicle/ejblitejsf/ejblitejsf_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_business_ejblitejsf_vehicle_web.addAsWebInfResource(warResURL, "web.xml"); - } - // The sun-web.xml descriptor - warResURL = JsfClient.class.getResource("//com/sun/ts/tests/common/vehicle/ejblitejsf/ejblitejsf_vehicle_web.war.sun-web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_business_ejblitejsf_vehicle_web.addAsWebInfResource(warResURL, "sun-web.xml"); - } - - // Any libraries added to the war - - // Web content - warResURL = JsfClient.class.getResource("/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/beans.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_business_ejblitejsf_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/beans.xml"); - } - warResURL = JsfClient.class.getResource("/com/sun/ts/tests/common/vehicle/ejblitejsf/beans.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_business_ejblitejsf_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/beans.xml"); - } - warResURL = JsfClient.class.getResource("/com/sun/ts/tests/common/vehicle/ejblitejsf/ejblitejsf_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_business_ejblitejsf_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/ejblitejsf_vehicle_web.xml"); - } - warResURL = JsfClient.class.getResource("/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/faces-config.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_business_ejblitejsf_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/faces-config.xml"); - } - warResURL = JsfClient.class.getResource("/com/sun/ts/tests/common/vehicle/ejblitejsf/faces-config.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_business_ejblitejsf_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/faces-config.xml"); - } - warResURL = JsfClient.class.getResource("/com/sun/ts/tests/common/vehicle/ejblitejsf/ejblitejsf_vehicle.xhtml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_business_ejblitejsf_vehicle_web.addAsWebResource(warResURL, "/ejblitejsf_vehicle.xhtml"); - } - - // Call the archive processor - archiveProcessor.processWebArchive(ejblite_packaging_war_mbean_interceptor_business_ejblitejsf_vehicle_web, JsfClient.class, warResURL); - - return ejblite_packaging_war_mbean_interceptor_business_ejblitejsf_vehicle_web; - } - - @Test - @Override - @TargetVehicle("ejblitejsf") - public void allInterceptors() { - super.allInterceptors(); - } - - @Test - @Override - @TargetVehicle("ejblitejsf") - public void excludeDefaultInterceptors() { - super.excludeDefaultInterceptors(); - } - - @Test - @Override - @TargetVehicle("ejblitejsf") - public void excludeClassInterceptors() { - super.excludeClassInterceptors(); - } - - @Test - @Override - @TargetVehicle("ejblitejsf") - public void overrideInterceptorMethod() { - super.overrideInterceptorMethod(); - } - - @Test - @Override - @TargetVehicle("ejblitejsf") - public void overrideBeanInterceptorMethod() { - super.overrideBeanInterceptorMethod(); - } - - @Test - @Override - @TargetVehicle("ejblitejsf") - public void overrideBeanInterceptorMethod2() { - super.overrideBeanInterceptorMethod2(); - } - - @Test - @Override - @TargetVehicle("ejblitejsf") - public void overrideBeanInterceptorMethod3() { - super.overrideBeanInterceptorMethod3(); - } - - @Test - @Override - @TargetVehicle("ejblitejsf") - public void overrideBeanInterceptorMethod4() { - super.overrideBeanInterceptorMethod4(); - } - - @Test - @Override - @TargetVehicle("ejblitejsf") - public void skipProceed() { - super.skipProceed(); - } - - -} \ No newline at end of file diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/build.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/build.xml deleted file mode 100644 index 8be8b11e27..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/build.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/ejblitejsp.tld b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/ejblitejsp.tld deleted file mode 100644 index 227208ce00..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/ejblitejsp.tld +++ /dev/null @@ -1,45 +0,0 @@ - - - - - 1.0 - ejblitejsp - /WEB-INF/tlds/ejblitejsp - - EJBLiteJSPTag - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.EJBLiteJSPTag - scriptless - - to display return value of getReason() - statusAndReason - - - testName - true - true - java.lang.String - - - injectionSupported - true - true - java.lang.Boolean - - - diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/ejbliteservlet2_vehicle_web.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/ejbliteservlet2_vehicle_web.xml deleted file mode 100644 index 165632b6ce..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/ejbliteservlet2_vehicle_web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - EJBLiteServlet2Filter - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.EJBLiteServlet2Filter - - - EJBLiteServlet2Filter - ejbliteservlet2_vehicle.jsp - - - ejbliteservlet2_vehicle.jsp - /ejbliteservlet2_vehicle.jsp - - - ejbliteservlet2_vehicle.jsp - /ejbliteservlet2_vehicle.jsp - - diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/ejbliteservlet_vehicle_web.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/ejbliteservlet_vehicle_web.xml deleted file mode 100644 index ecc3f107dd..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/business/ejbliteservlet_vehicle_web.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - EJBLiteServletVehicle - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.business.EJBLiteServletVehicle - - - EJBLiteServletVehicle - /ejbliteservlet_vehicle.jsp - - diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/Client.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/Client.java deleted file mode 100644 index e45099d68b..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/Client.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext; - -import com.sun.ts.tests.ejb30.common.helper.TestFailedException; -import com.sun.ts.tests.ejb30.common.invocationcontext.InvocationContextIF; -import com.sun.ts.tests.ejb30.common.invocationcontext.InvocationContextTestImpl; -import com.sun.ts.tests.ejb30.common.lite.EJBLiteClientBase; - -import jakarta.annotation.PostConstruct; -import jakarta.annotation.Resource; - -public class Client extends EJBLiteClientBase { - @Resource(lookup = "java:module/InvocationContextBean") - // @Resource() - private InvocationContextIF bean; - - @Resource(lookup = "java:module/InvocationContextInterceptorBean") - // @Resource() - private InvocationContextIF bean2; - - private InvocationContextIF[] beans = new InvocationContextIF[2]; - - @SuppressWarnings("unused") - @PostConstruct - private void postConstruct() { - beans[0] = bean; - beans[1] = bean2; - } - - /* - * @testName: setParametersIllegalArgumentException - * - * @test_Strategy: - */ - public void setParametersIllegalArgumentException() - throws TestFailedException { - InvocationContextTestImpl.setParametersIllegalArgumentException(beans); - } - - /* - * @testName: getTarget - * - * @test_Strategy: the bean business method getTarget return the identity - * hashcode for the bean instance, which is compared to the result of - * InvocationContext.getTarget()'s. They should be the same. This test is - * executed for AroundInvoke methods in both the bean class and in interceptor - * class. - */ - public void getTarget() throws TestFailedException { - InvocationContextTestImpl.getTarget(beans); - } - - /* - * @testName: getContextData - * - * @test_Strategy: Put context data in interceptor method and verify it inside - * finally block after executing business method. This test is executed for - * AroundInvoke methods in both the bean class and in interceptor class. - */ - public void getContextData() throws TestFailedException { - InvocationContextTestImpl.getContextData(beans); - } - - /* - * @testName: getTimer - * - * @test_Strategy: InvocatioinContext.getTimer() returns null for lifecycle - * and around-invoke methods. - */ - public void getTimer() throws TestFailedException { - InvocationContextTestImpl.getTimer(beans); - } - - /* - * @testName: getSetParameters - * - * @test_Strategy: the bean business method getSetParametersEmpty takes no - * params. InvocationContext.getParameters() should return null or empty - * params. Setting params to a non-empty array should result in - * IllegalArgumentException. The bean business method getSetParameters takes 2 - * String params, verified and modified in interceptor. The client should get - * the result based on the new params. - */ - public void getSetParameters() throws TestFailedException { - InvocationContextTestImpl.getSetParametersEmpty(beans); - InvocationContextTestImpl.getSetParameters(beans); - } - - /* - * @testName: proceedAgain - * - * @test_Strategy: call proceed() from interceptor method. The first call - * results in TestFailedException, and the subsequent proceed() call returns - * true. Expecting TestFailedException from the first proceed call, and true - * value from the second proceed call. - */ - public void proceedAgain() throws TestFailedException { - InvocationContextTestImpl.proceedAgain(beans); - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/ClientEjblitejspTest.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/ClientEjblitejspTest.java deleted file mode 100644 index da85bebee9..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/ClientEjblitejspTest.java +++ /dev/null @@ -1,160 +0,0 @@ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext; - -import com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.Client; -import java.net.URL; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.OperateOnDeployment; -import org.jboss.arquillian.container.test.api.OverProtocol; -import org.jboss.arquillian.container.test.api.TargetsContainer; -import org.jboss.arquillian.junit5.ArquillianExtension; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.StringAsset; -import org.jboss.shrinkwrap.api.exporter.ZipExporter; -import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.junit.jupiter.api.MethodOrderer; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestMethodOrder; -import org.junit.jupiter.api.extension.ExtendWith; -import tck.arquillian.porting.lib.spi.TestArchiveProcessor; -import tck.arquillian.protocol.common.TargetVehicle; - - - -@ExtendWith(ArquillianExtension.class) -@Tag("platform") -@Tag("ejb_web") -@Tag("web") -@Tag("tck-javatest") - -@TestMethodOrder(MethodOrderer.MethodName.class) -public class ClientEjblitejspTest extends com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.Client { - static final String VEHICLE_ARCHIVE = "ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsp_vehicle"; - - /** - EE10 Deployment Descriptors: - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsf_vehicle_web: WEB-INF/beans.xml,WEB-INF/faces-config.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsp_vehicle_web: - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet_vehicle_web: WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet2_vehicle_web: WEB-INF/web.xml - - Found Descriptors: - War: - - */ - @TargetsContainer("tck-javatest") - @OverProtocol("javatest") - @Deployment(name = VEHICLE_ARCHIVE, order = 2) - public static WebArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) { - - // War - // the war with the correct archive name - WebArchive ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsp_vehicle_web = ShrinkWrap.create(WebArchive.class, "ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsp_vehicle_web.war"); - // The class files - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsp_vehicle_web.addClasses( - com.sun.ts.tests.ejb30.common.helper.TestFailedException.class, - com.sun.ts.lib.harness.EETest.Fault.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.InvocationContextBean.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.EJBLiteJSPTag.class, - com.sun.ts.tests.common.vehicle.VehicleRunnable.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.InvocationContextInterceptorBean.class, - com.sun.ts.tests.ejb30.common.helper.Helper.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteClientBase.class, - com.sun.ts.lib.harness.EETest.class, - com.sun.ts.lib.harness.ServiceEETest.class, - com.sun.ts.tests.common.vehicle.VehicleClient.class, - com.sun.ts.tests.ejb30.common.lite.NumberIF.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteClientIF.class, - com.sun.ts.tests.ejb30.common.invocationcontext.InvocationContextIF.class, - com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.ReasonableStatus.class, - com.sun.ts.tests.ejb30.common.invocationcontext.InvocationContextTestImpl.class, - com.sun.ts.tests.ejb30.common.lite.NumberEnum.class, - com.sun.ts.tests.ejb30.common.invocationcontext.InvocationContextBase.class, - com.sun.ts.tests.ejb30.common.invocationcontext.InterceptorForAll.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteJsfClientBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.JsfClient.class, - com.sun.ts.lib.harness.EETest.SetupException.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.Client.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.HttpServletDelegate.class - ); - // The web.xml descriptor - URL warResURL = Client.class.getResource("/vehicle/ejblitejsp/ejblitejsp_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsp_vehicle_web.addAsWebInfResource(warResURL, "web.xml"); - } - // The sun-web.xml descriptor - warResURL = Client.class.getResource("//vehicle/ejblitejsp/ejblitejsp_vehicle_web.war.sun-web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsp_vehicle_web.addAsWebInfResource(warResURL, "sun-web.xml"); - } - - // Any libraries added to the war - - // Web content - warResURL = Client.class.getResource("/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/ejblitejsp.tld"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsp_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/tlds/ejblitejsp.tld"); - } - warResURL = Client.class.getResource("/com/sun/ts/tests/common/vehicle/ejblitejsp/ejblitejsp.tld"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsp_vehicle_web.addAsWebResource(warResURL, "/ejblitejsp.tld"); - } - warResURL = Client.class.getResource("/com/sun/ts/tests/common/vehicle/ejblitejsp/ejblitejsp_vehicle.jsp"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsp_vehicle_web.addAsWebResource(warResURL, "/ejblitejsp_vehicle.jsp"); - } - - // Call the archive processor - archiveProcessor.processWebArchive(ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsp_vehicle_web, Client.class, warResURL); - - return ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsp_vehicle_web; - } - - @Test - @Override - @TargetVehicle("ejblitejsp") - public void setParametersIllegalArgumentException() throws com.sun.ts.tests.ejb30.common.helper.TestFailedException { - super.setParametersIllegalArgumentException(); - } - - @Test - @Override - @TargetVehicle("ejblitejsp") - public void getTarget() throws com.sun.ts.tests.ejb30.common.helper.TestFailedException { - super.getTarget(); - } - - @Test - @Override - @TargetVehicle("ejblitejsp") - public void getContextData() throws com.sun.ts.tests.ejb30.common.helper.TestFailedException { - super.getContextData(); - } - - @Test - @Override - @TargetVehicle("ejblitejsp") - public void getTimer() throws com.sun.ts.tests.ejb30.common.helper.TestFailedException { - super.getTimer(); - } - - @Test - @Override - @TargetVehicle("ejblitejsp") - public void getSetParameters() throws com.sun.ts.tests.ejb30.common.helper.TestFailedException { - super.getSetParameters(); - } - - @Test - @Override - @TargetVehicle("ejblitejsp") - public void proceedAgain() throws com.sun.ts.tests.ejb30.common.helper.TestFailedException { - super.proceedAgain(); - } - - -} \ No newline at end of file diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/ClientEjbliteservlet2Test.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/ClientEjbliteservlet2Test.java deleted file mode 100644 index 1d3d898671..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/ClientEjbliteservlet2Test.java +++ /dev/null @@ -1,157 +0,0 @@ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext; - -import com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.Client; -import java.net.URL; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.OperateOnDeployment; -import org.jboss.arquillian.container.test.api.OverProtocol; -import org.jboss.arquillian.container.test.api.TargetsContainer; -import org.jboss.arquillian.junit5.ArquillianExtension; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.StringAsset; -import org.jboss.shrinkwrap.api.exporter.ZipExporter; -import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.junit.jupiter.api.MethodOrderer; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestMethodOrder; -import org.junit.jupiter.api.extension.ExtendWith; -import tck.arquillian.porting.lib.spi.TestArchiveProcessor; -import tck.arquillian.protocol.common.TargetVehicle; - - - -@ExtendWith(ArquillianExtension.class) -@Tag("platform") -@Tag("ejb_web") -@Tag("web") -@Tag("tck-javatest") - -@TestMethodOrder(MethodOrderer.MethodName.class) -public class ClientEjbliteservlet2Test extends com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.Client { - static final String VEHICLE_ARCHIVE = "ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet2_vehicle"; - - /** - EE10 Deployment Descriptors: - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsf_vehicle_web: WEB-INF/beans.xml,WEB-INF/faces-config.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsp_vehicle_web: - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet_vehicle_web: WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet2_vehicle_web: WEB-INF/web.xml - - Found Descriptors: - War: - - /com/sun/ts/tests/common/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle_web.xml - */ - @TargetsContainer("tck-javatest") - @OverProtocol("javatest") - @Deployment(name = VEHICLE_ARCHIVE, order = 2) - public static WebArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) { - - // War - // the war with the correct archive name - WebArchive ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet2_vehicle_web = ShrinkWrap.create(WebArchive.class, "ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet2_vehicle_web.war"); - // The class files - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet2_vehicle_web.addClasses( - com.sun.ts.tests.ejb30.common.helper.TestFailedException.class, - com.sun.ts.lib.harness.EETest.Fault.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.InvocationContextBean.class, - com.sun.ts.tests.common.vehicle.VehicleRunnable.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.InvocationContextInterceptorBean.class, - com.sun.ts.tests.ejb30.common.helper.Helper.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteClientBase.class, - com.sun.ts.lib.harness.EETest.class, - com.sun.ts.lib.harness.ServiceEETest.class, - com.sun.ts.tests.common.vehicle.VehicleClient.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.EJBLiteServlet2Filter.class, - com.sun.ts.tests.ejb30.common.lite.NumberIF.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteClientIF.class, - com.sun.ts.tests.ejb30.common.invocationcontext.InvocationContextIF.class, - com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.ReasonableStatus.class, - com.sun.ts.tests.ejb30.common.invocationcontext.InvocationContextTestImpl.class, - com.sun.ts.tests.ejb30.common.lite.NumberEnum.class, - com.sun.ts.tests.ejb30.common.invocationcontext.InvocationContextBase.class, - com.sun.ts.tests.ejb30.common.invocationcontext.InterceptorForAll.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteJsfClientBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.JsfClient.class, - com.sun.ts.lib.harness.EETest.SetupException.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.Client.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.HttpServletDelegate.class - ); - // The web.xml descriptor - URL warResURL = Client.class.getResource("ejbliteservlet2_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet2_vehicle_web.addAsWebInfResource(warResURL, "web.xml"); - } - // The sun-web.xml descriptor - warResURL = Client.class.getResource("/ejbliteservlet2_vehicle_web.war.sun-web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet2_vehicle_web.addAsWebInfResource(warResURL, "sun-web.xml"); - } - - // Any libraries added to the war - - // Web content - warResURL = Client.class.getResource("/com/sun/ts/tests/common/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet2_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/ejbliteservlet2_vehicle_web.xml"); - } - warResURL = Client.class.getResource("/com/sun/ts/tests/common/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle.jsp"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet2_vehicle_web.addAsWebResource(warResURL, "/ejbliteservlet2_vehicle.jsp"); - } - - // Call the archive processor - archiveProcessor.processWebArchive(ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet2_vehicle_web, Client.class, warResURL); - - return ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet2_vehicle_web; - } - - @Test - @Override - @TargetVehicle("ejbliteservlet2") - public void setParametersIllegalArgumentException() throws com.sun.ts.tests.ejb30.common.helper.TestFailedException { - super.setParametersIllegalArgumentException(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet2") - public void getTarget() throws com.sun.ts.tests.ejb30.common.helper.TestFailedException { - super.getTarget(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet2") - public void getContextData() throws com.sun.ts.tests.ejb30.common.helper.TestFailedException { - super.getContextData(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet2") - public void getTimer() throws com.sun.ts.tests.ejb30.common.helper.TestFailedException { - super.getTimer(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet2") - public void getSetParameters() throws com.sun.ts.tests.ejb30.common.helper.TestFailedException { - super.getSetParameters(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet2") - public void proceedAgain() throws com.sun.ts.tests.ejb30.common.helper.TestFailedException { - super.proceedAgain(); - } - - -} \ No newline at end of file diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/ClientEjbliteservletTest.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/ClientEjbliteservletTest.java deleted file mode 100644 index 5482baac43..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/ClientEjbliteservletTest.java +++ /dev/null @@ -1,153 +0,0 @@ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext; - -import com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.Client; -import java.net.URL; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.OperateOnDeployment; -import org.jboss.arquillian.container.test.api.OverProtocol; -import org.jboss.arquillian.container.test.api.TargetsContainer; -import org.jboss.arquillian.junit5.ArquillianExtension; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.StringAsset; -import org.jboss.shrinkwrap.api.exporter.ZipExporter; -import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.junit.jupiter.api.MethodOrderer; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestMethodOrder; -import org.junit.jupiter.api.extension.ExtendWith; -import tck.arquillian.porting.lib.spi.TestArchiveProcessor; -import tck.arquillian.protocol.common.TargetVehicle; - - - -@ExtendWith(ArquillianExtension.class) -@Tag("platform") -@Tag("ejb_web") -@Tag("web") -@Tag("tck-javatest") - -@TestMethodOrder(MethodOrderer.MethodName.class) -public class ClientEjbliteservletTest extends com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.Client { - static final String VEHICLE_ARCHIVE = "ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet_vehicle"; - - /** - EE10 Deployment Descriptors: - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsf_vehicle_web: WEB-INF/beans.xml,WEB-INF/faces-config.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsp_vehicle_web: - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet_vehicle_web: WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet2_vehicle_web: WEB-INF/web.xml - - Found Descriptors: - War: - - /com/sun/ts/tests/common/vehicle/ejbliteservlet/ejbliteservlet_vehicle_web.xml - */ - @TargetsContainer("tck-javatest") - @OverProtocol("javatest") - @Deployment(name = VEHICLE_ARCHIVE, order = 2) - public static WebArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) { - - // War - // the war with the correct archive name - WebArchive ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet_vehicle_web = ShrinkWrap.create(WebArchive.class, "ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet_vehicle_web.war"); - // The class files - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet_vehicle_web.addClasses( - com.sun.ts.tests.ejb30.common.helper.TestFailedException.class, - com.sun.ts.lib.harness.EETest.Fault.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.InvocationContextBean.class, - com.sun.ts.tests.common.vehicle.VehicleRunnable.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.InvocationContextInterceptorBean.class, - com.sun.ts.tests.ejb30.common.helper.Helper.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteClientBase.class, - com.sun.ts.lib.harness.EETest.class, - com.sun.ts.lib.harness.ServiceEETest.class, - com.sun.ts.tests.common.vehicle.VehicleClient.class, - com.sun.ts.tests.ejb30.common.lite.NumberIF.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteClientIF.class, - com.sun.ts.tests.ejb30.common.invocationcontext.InvocationContextIF.class, - com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.ReasonableStatus.class, - com.sun.ts.tests.ejb30.common.invocationcontext.InvocationContextTestImpl.class, - com.sun.ts.tests.ejb30.common.lite.NumberEnum.class, - com.sun.ts.tests.ejb30.common.invocationcontext.InvocationContextBase.class, - com.sun.ts.tests.ejb30.common.invocationcontext.InterceptorForAll.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.EJBLiteServletVehicle.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteJsfClientBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.JsfClient.class, - com.sun.ts.lib.harness.EETest.SetupException.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.Client.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.HttpServletDelegate.class - ); - // The web.xml descriptor - URL warResURL = Client.class.getResource("ejbliteservlet_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet_vehicle_web.addAsWebInfResource(warResURL, "web.xml"); - } - // The sun-web.xml descriptor - warResURL = Client.class.getResource("/ejbliteservlet_vehicle_web.war.sun-web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet_vehicle_web.addAsWebInfResource(warResURL, "sun-web.xml"); - } - - // Any libraries added to the war - - // Web content - warResURL = Client.class.getResource("/com/sun/ts/tests/common/vehicle/ejbliteservlet/ejbliteservlet_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/ejbliteservlet_vehicle_web.xml"); - } - - // Call the archive processor - archiveProcessor.processWebArchive(ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet_vehicle_web, Client.class, warResURL); - - return ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet_vehicle_web; - } - - @Test - @Override - @TargetVehicle("ejbliteservlet") - public void setParametersIllegalArgumentException() throws com.sun.ts.tests.ejb30.common.helper.TestFailedException { - super.setParametersIllegalArgumentException(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet") - public void getTarget() throws com.sun.ts.tests.ejb30.common.helper.TestFailedException { - super.getTarget(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet") - public void getContextData() throws com.sun.ts.tests.ejb30.common.helper.TestFailedException { - super.getContextData(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet") - public void getTimer() throws com.sun.ts.tests.ejb30.common.helper.TestFailedException { - super.getTimer(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet") - public void getSetParameters() throws com.sun.ts.tests.ejb30.common.helper.TestFailedException { - super.getSetParameters(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet") - public void proceedAgain() throws com.sun.ts.tests.ejb30.common.helper.TestFailedException { - super.proceedAgain(); - } - - -} \ No newline at end of file diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/EJBLiteJSPTag.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/EJBLiteJSPTag.java deleted file mode 100644 index 2186dbe1eb..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/EJBLiteJSPTag.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext; - -import jakarta.servlet.jsp.JspContext; -import jakarta.servlet.jsp.JspWriter; -import jakarta.servlet.jsp.JspException; -import jakarta.servlet.jsp.tagext.JspFragment; -import jakarta.servlet.jsp.tagext.JspTag; -import jakarta.servlet.jsp.PageContext; -import jakarta.servlet.jsp.tagext.SimpleTag; -import java.io.IOException; - -public class EJBLiteJSPTag extends Client implements SimpleTag { - /** Reference to the enclosing tag. */ - private JspTag parentTag; - - /** The JSP context for the upcoming tag invocation. */ - private JspContext jspContext; - - /** The body of the tag. */ - private JspFragment jspBody; - - /** - * Called by the container to invoke this tag. - * The implementation of this method is provided by the tag library developer, - * and handles all tag processing, body iteration, etc. - */ - public void doTag() throws JspException { - JspWriter out = getJspContext().getOut(); - setModuleName( - ((PageContext) getJspContext()).getServletContext().getContextPath() ); - String sta = getStatus(); //to trigger the test run - getJspContext().setAttribute("statusAndReason", sta + " " + getReason()); - JspFragment f = getJspBody(); - if (f != null) { - try { - f.invoke(out); - } catch (IOException e) { - throw new JspException(e); - } - } - } - - /** - * Sets the parent of this tag, for collaboration purposes. - *

- * The container invokes this method only if this tag invocation is - * nested within another tag invocation. - * - * @param parent the tag that encloses this tag - */ - public void setParent(JspTag parent) { - this.parentTag = parent; - } - - /** - * Returns the parent of this tag, for collaboration purposes. - * - * @return the parent of this tag - */ - public JspTag getParent() { - return this.parentTag; - } - - /** - * Stores the provided JSP context in the private jspContext field. - * Subclasses can access the JspContext via - * getJspContext(). - * - * @param pc the page context for this invocation - * @see SimpleTag#setJspContext - */ - public void setJspContext(JspContext pc) { - this.jspContext = pc; - } - - /** - * Returns the page context passed in by the container via - * setJspContext. - * - * @return the page context for this invocation - */ - protected JspContext getJspContext() { - return this.jspContext; - } - - /** - * Stores the provided JspFragment. - * - * @param jspBody The fragment encapsulating the body of this tag. - * If the action element is empty in the page, this method is - * not called at all. - * @see SimpleTag#setJspBody - */ - public void setJspBody(JspFragment jspBody) { - this.jspBody = jspBody; - } - - /** - * Returns the body passed in by the container via setJspBody. - * - * @return the fragment encapsulating the body of this tag, or - * null if the action element is empty in the page. - */ - protected JspFragment getJspBody() { - return this.jspBody; - } - -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/EJBLiteServlet2Filter.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/EJBLiteServlet2Filter.java deleted file mode 100644 index 8d5b2e3bb5..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/EJBLiteServlet2Filter.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext; - -import java.io.IOException; -import java.io.PrintWriter; -import jakarta.servlet.Filter; -import jakarta.servlet.FilterChain; -import jakarta.servlet.FilterConfig; -import jakarta.servlet.ServletException; -import jakarta.servlet.ServletRequest; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.ServletResponse; -import java.util.logging.Logger; -import java.util.logging.Level; - -public class EJBLiteServlet2Filter extends Client implements Filter { - private static Logger logger = Logger.getLogger(EJBLiteServlet2Filter.class.getName()); - private FilterConfig filterConfig; - - public void doFilter(ServletRequest request, ServletResponse response, - FilterChain chain) - throws IOException, ServletException { - response.setContentType("text/plain"); - setInjectionSupported(true); - String tn = request.getParameter("testName"); - if(logger.isLoggable(Level.FINE)) { - logger.fine("doFilter testName=" + tn); - } - setTestName(tn); - setModuleName( ((HttpServletRequest) request).getContextPath() ); - String sta = getStatus(); //to trigger the test run - PrintWriter pw = response.getWriter(); - pw.println(sta + " " + getReason()); - cleanup(); //need to reset all fields since filter instances are shared - //skip the rest of the chain - } - - public void destroy() { - } - - public void init(FilterConfig filterConfig) { - this.filterConfig = filterConfig; - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/EJBLiteServletVehicle.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/EJBLiteServletVehicle.java deleted file mode 100644 index 31b9b70010..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/EJBLiteServletVehicle.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext; - -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Enumeration; -import java.util.Iterator; -import jakarta.servlet.Servlet; -import jakarta.servlet.http.HttpServlet; -import jakarta.servlet.ServletContext; -import jakarta.servlet.ServletException; -import jakarta.servlet.ServletRequest; -import jakarta.servlet.ServletResponse; -import java.util.logging.Logger; -import java.util.logging.Level; -import jakarta.servlet.ServletConfig; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; - -public class EJBLiteServletVehicle extends Client - implements Servlet, ServletConfig { - - private static Logger logger = Logger.getLogger(EJBLiteServletVehicle.class.getName()); - - private HttpServletDelegate delegate = new HttpServletDelegate(); - - public void init(ServletConfig config) throws ServletException { - delegate.init(config); - } - - public ServletConfig getServletConfig() { - return delegate.getServletConfig(); - } - - public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException { - delegate.service(request, response); - - setInjectionSupported(true); - String tn = request.getParameter("testName"); - logger.fine("EJBLiteServletVehicle processing request testName=" + tn); - setTestName(tn); - setModuleName(getServletContext().getContextPath()); - String sta = getStatus(); //to trigger the test run - - PrintWriter pw = response.getWriter(); - pw.println(sta + " " + getReason()); - cleanup(); //need to reset all fields since servlet instances are shared - - } - - public String getServletInfo() { - return delegate.getServletInfo(); - } - - public void destroy() { - delegate.destroy(); - delegate = null; - } - - public String getServletName() { - return delegate.getServletName(); - } - - public ServletContext getServletContext() { - return delegate.getServletContext(); - } - - public String getInitParameter(String arg0) { - return delegate.getInitParameter(arg0); - } - - public Enumeration getInitParameterNames() { - return delegate.getInitParameterNames(); - } - - -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/HttpServletDelegate.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/HttpServletDelegate.java deleted file mode 100644 index 5176a3e51b..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/HttpServletDelegate.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - - package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext; - -import java.io.IOException; -import java.io.PrintWriter; -import jakarta.servlet.ServletException; -import java.util.logging.Logger; -import java.util.logging.Level; -import jakarta.servlet.http.HttpServlet; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; - -public class HttpServletDelegate extends HttpServlet { - - private static Logger logger = Logger.getLogger(HttpServletDelegate.class.getName()); - - @Override - protected void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - processRequest(request, response); - } - - @Override - protected void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - processRequest(request, response); - } - - private void processRequest(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - response.setContentType("text/plain"); - } - } diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/InvocationContextBean.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/InvocationContextBean.java deleted file mode 100644 index 4904665fd7..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/InvocationContextBean.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext; - -import com.sun.ts.tests.ejb30.common.invocationcontext.InvocationContextBase; -import com.sun.ts.tests.ejb30.common.invocationcontext.InvocationContextIF; -import com.sun.ts.tests.ejb30.common.invocationcontext.InvocationContextTestImpl; - -import jakarta.annotation.ManagedBean; -import jakarta.interceptor.AroundInvoke; -import jakarta.interceptor.InvocationContext; - -@ManagedBean("InvocationContextBean") -public class InvocationContextBean extends InvocationContextBase - implements InvocationContextIF { - @SuppressWarnings("unused") - @AroundInvoke - private Object intercep(InvocationContext inv) throws Exception { - InvocationContextTestImpl.interceptAll(inv); - return inv.proceed(); - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/InvocationContextInterceptorBean.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/InvocationContextInterceptorBean.java deleted file mode 100644 index 313e4a0cc3..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/InvocationContextInterceptorBean.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext; - -import com.sun.ts.tests.ejb30.common.invocationcontext.InvocationContextBase; -import com.sun.ts.tests.ejb30.common.invocationcontext.InvocationContextIF; - -import jakarta.annotation.ManagedBean; -import jakarta.interceptor.Interceptors; - -@ManagedBean("InvocationContextInterceptorBean") -@Interceptors(com.sun.ts.tests.ejb30.common.invocationcontext.InterceptorForAll.class) -public class InvocationContextInterceptorBean extends InvocationContextBase - implements InvocationContextIF { -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/JsfClient.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/JsfClient.java deleted file mode 100644 index 7e726e4fc8..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/JsfClient.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext; - -import java.io.Serializable; - -import com.sun.ts.tests.ejb30.common.helper.TestFailedException; -import com.sun.ts.tests.ejb30.common.invocationcontext.InvocationContextIF; -import com.sun.ts.tests.ejb30.common.invocationcontext.InvocationContextTestImpl; -import com.sun.ts.tests.ejb30.common.lite.EJBLiteJsfClientBase; -import jakarta.annotation.PostConstruct; -import jakarta.annotation.Resource; - -@jakarta.inject.Named("client") -@jakarta.enterprise.context.RequestScoped -public class JsfClient extends EJBLiteJsfClientBase implements Serializable { - - private static final long serialVersionUID = 1L; - - @Resource(lookup = "java:module/InvocationContextBean") - // @Resource() - private InvocationContextIF bean; - - @Resource(lookup = "java:module/InvocationContextInterceptorBean") - // @Resource() - private InvocationContextIF bean2; - - private InvocationContextIF[] beans = new InvocationContextIF[2]; - - @SuppressWarnings("unused") - @PostConstruct - private void postConstruct() { - beans[0] = bean; - beans[1] = bean2; - } - - /* - * @testName: setParametersIllegalArgumentException - * - * @test_Strategy: - */ - public void setParametersIllegalArgumentException() - throws TestFailedException { - InvocationContextTestImpl.setParametersIllegalArgumentException(beans); - } - - /* - * @testName: getTarget - * - * @test_Strategy: the bean business method getTarget return the identity - * hashcode for the bean instance, which is compared to the result of - * InvocationContext.getTarget()'s. They should be the same. This test is - * executed for AroundInvoke methods in both the bean class and in interceptor - * class. - */ - public void getTarget() throws TestFailedException { - InvocationContextTestImpl.getTarget(beans); - } - - /* - * @testName: getContextData - * - * @test_Strategy: Put context data in interceptor method and verify it inside - * finally block after executing business method. This test is executed for - * AroundInvoke methods in both the bean class and in interceptor class. - */ - public void getContextData() throws TestFailedException { - InvocationContextTestImpl.getContextData(beans); - } - - /* - * @testName: getTimer - * - * @test_Strategy: InvocatioinContext.getTimer() returns null for lifecycle - * and around-invoke methods. - */ - public void getTimer() throws TestFailedException { - InvocationContextTestImpl.getTimer(beans); - } - - /* - * @testName: getSetParameters - * - * @test_Strategy: the bean business method getSetParametersEmpty takes no - * params. InvocationContext.getParameters() should return null or empty - * params. Setting params to a non-empty array should result in - * IllegalArgumentException. The bean business method getSetParameters takes 2 - * String params, verified and modified in interceptor. The client should get - * the result based on the new params. - */ - public void getSetParameters() throws TestFailedException { - InvocationContextTestImpl.getSetParametersEmpty(beans); - InvocationContextTestImpl.getSetParameters(beans); - } - - /* - * @testName: proceedAgain - * - * @test_Strategy: call proceed() from interceptor method. The first call - * results in TestFailedException, and the subsequent proceed() call returns - * true. Expecting TestFailedException from the first proceed call, and true - * value from the second proceed call. - */ - public void proceedAgain() throws TestFailedException { - InvocationContextTestImpl.proceedAgain(beans); - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/JsfClientEjblitejsfTest.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/JsfClientEjblitejsfTest.java deleted file mode 100644 index b6a23bcc56..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/JsfClientEjblitejsfTest.java +++ /dev/null @@ -1,172 +0,0 @@ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext; - -import com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.JsfClient; -import java.net.URL; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.OperateOnDeployment; -import org.jboss.arquillian.container.test.api.OverProtocol; -import org.jboss.arquillian.container.test.api.TargetsContainer; -import org.jboss.arquillian.junit5.ArquillianExtension; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.StringAsset; -import org.jboss.shrinkwrap.api.exporter.ZipExporter; -import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.junit.jupiter.api.MethodOrderer; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestMethodOrder; -import org.junit.jupiter.api.extension.ExtendWith; -import tck.arquillian.porting.lib.spi.TestArchiveProcessor; -import tck.arquillian.protocol.common.TargetVehicle; - - - -@ExtendWith(ArquillianExtension.class) -@Tag("platform") -@Tag("ejb_web") -@Tag("web") -@Tag("tck-javatest") - -@TestMethodOrder(MethodOrderer.MethodName.class) -public class JsfClientEjblitejsfTest extends com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.JsfClient { - static final String VEHICLE_ARCHIVE = "ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsf_vehicle"; - - /** - EE10 Deployment Descriptors: - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsf_vehicle_web: WEB-INF/beans.xml,WEB-INF/faces-config.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsp_vehicle_web: - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet_vehicle_web: WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejbliteservlet2_vehicle_web: WEB-INF/web.xml - - Found Descriptors: - War: - - /com/sun/ts/tests/common/vehicle/ejblitejsf/ejblitejsf_vehicle_web.xml - */ - @TargetsContainer("tck-javatest") - @OverProtocol("javatest") - @Deployment(name = VEHICLE_ARCHIVE, order = 2) - public static WebArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) { - - // War - // the war with the correct archive name - WebArchive ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsf_vehicle_web = ShrinkWrap.create(WebArchive.class, "ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsf_vehicle_web.war"); - // The class files - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsf_vehicle_web.addClasses( - com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteClientIF.class, - com.sun.ts.tests.ejb30.common.helper.TestFailedException.class, - com.sun.ts.tests.ejb30.common.invocationcontext.InvocationContextIF.class, - com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, - com.sun.ts.lib.harness.EETest.Fault.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.ReasonableStatus.class, - com.sun.ts.tests.ejb30.common.invocationcontext.InvocationContextTestImpl.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.InvocationContextBean.class, - com.sun.ts.tests.common.vehicle.VehicleRunnable.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.InvocationContextInterceptorBean.class, - com.sun.ts.tests.ejb30.common.lite.NumberEnum.class, - com.sun.ts.tests.ejb30.common.helper.Helper.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteClientBase.class, - com.sun.ts.tests.ejb30.common.invocationcontext.InvocationContextBase.class, - com.sun.ts.tests.ejb30.common.invocationcontext.InterceptorForAll.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteJsfClientBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.JsfClient.class, - com.sun.ts.lib.harness.EETest.class, - com.sun.ts.lib.harness.ServiceEETest.class, - com.sun.ts.lib.harness.EETest.SetupException.class, - com.sun.ts.tests.common.vehicle.VehicleClient.class, - com.sun.ts.tests.ejb30.common.lite.NumberIF.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.Client.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.HttpServletDelegate.class - ); - // The web.xml descriptor - URL warResURL = JsfClient.class.getResource("/com/sun/ts/tests/common/vehicle/ejblitejsf/ejblitejsf_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsf_vehicle_web.addAsWebInfResource(warResURL, "web.xml"); - } - // The sun-web.xml descriptor - warResURL = JsfClient.class.getResource("//com/sun/ts/tests/common/vehicle/ejblitejsf/ejblitejsf_vehicle_web.war.sun-web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsf_vehicle_web.addAsWebInfResource(warResURL, "sun-web.xml"); - } - - // Any libraries added to the war - - // Web content - warResURL = JsfClient.class.getResource("/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/beans.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsf_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/beans.xml"); - } - warResURL = JsfClient.class.getResource("/com/sun/ts/tests/common/vehicle/ejblitejsf/beans.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsf_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/beans.xml"); - } - warResURL = JsfClient.class.getResource("/com/sun/ts/tests/common/vehicle/ejblitejsf/ejblitejsf_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsf_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/ejblitejsf_vehicle_web.xml"); - } - warResURL = JsfClient.class.getResource("/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/faces-config.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsf_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/faces-config.xml"); - } - warResURL = JsfClient.class.getResource("/com/sun/ts/tests/common/vehicle/ejblitejsf/faces-config.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsf_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/faces-config.xml"); - } - warResURL = JsfClient.class.getResource("/com/sun/ts/tests/common/vehicle/ejblitejsf/ejblitejsf_vehicle.xhtml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsf_vehicle_web.addAsWebResource(warResURL, "/ejblitejsf_vehicle.xhtml"); - } - - // Call the archive processor - archiveProcessor.processWebArchive(ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsf_vehicle_web, JsfClient.class, warResURL); - - return ejblite_packaging_war_mbean_interceptor_invocationcontext_ejblitejsf_vehicle_web; - } - - @Test - @Override - @TargetVehicle("ejblitejsf") - public void setParametersIllegalArgumentException() throws com.sun.ts.tests.ejb30.common.helper.TestFailedException { - super.setParametersIllegalArgumentException(); - } - - @Test - @Override - @TargetVehicle("ejblitejsf") - public void getTarget() throws com.sun.ts.tests.ejb30.common.helper.TestFailedException { - super.getTarget(); - } - - @Test - @Override - @TargetVehicle("ejblitejsf") - public void getContextData() throws com.sun.ts.tests.ejb30.common.helper.TestFailedException { - super.getContextData(); - } - - @Test - @Override - @TargetVehicle("ejblitejsf") - public void getTimer() throws com.sun.ts.tests.ejb30.common.helper.TestFailedException { - super.getTimer(); - } - - @Test - @Override - @TargetVehicle("ejblitejsf") - public void getSetParameters() throws com.sun.ts.tests.ejb30.common.helper.TestFailedException { - super.getSetParameters(); - } - - @Test - @Override - @TargetVehicle("ejblitejsf") - public void proceedAgain() throws com.sun.ts.tests.ejb30.common.helper.TestFailedException { - super.proceedAgain(); - } - - -} \ No newline at end of file diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/build.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/build.xml deleted file mode 100644 index fbaa2dca96..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/build.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/ejblitejsp.tld b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/ejblitejsp.tld deleted file mode 100644 index b131d62c85..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/ejblitejsp.tld +++ /dev/null @@ -1,45 +0,0 @@ - - - - - 1.0 - ejblitejsp - /WEB-INF/tlds/ejblitejsp - - EJBLiteJSPTag - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.EJBLiteJSPTag - scriptless - - to display return value of getReason() - statusAndReason - - - testName - true - true - java.lang.String - - - injectionSupported - true - true - java.lang.Boolean - - - diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/ejbliteservlet2_vehicle_web.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/ejbliteservlet2_vehicle_web.xml deleted file mode 100644 index 2b6d608583..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/ejbliteservlet2_vehicle_web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - EJBLiteServlet2Filter - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.EJBLiteServlet2Filter - - - EJBLiteServlet2Filter - ejbliteservlet2_vehicle.jsp - - - ejbliteservlet2_vehicle.jsp - /ejbliteservlet2_vehicle.jsp - - - ejbliteservlet2_vehicle.jsp - /ejbliteservlet2_vehicle.jsp - - diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/ejbliteservlet_vehicle_web.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/ejbliteservlet_vehicle_web.xml deleted file mode 100644 index f06b0c9fa5..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/invocationcontext/ejbliteservlet_vehicle_web.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - EJBLiteServletVehicle - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.invocationcontext.EJBLiteServletVehicle - - - EJBLiteServletVehicle - /ejbliteservlet_vehicle.jsp - - diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/AManagedBean.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/AManagedBean.java deleted file mode 100644 index e032bff348..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/AManagedBean.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle; - -import com.sun.ts.tests.ejb30.common.helper.Helper; - -import jakarta.annotation.ManagedBean; -import jakarta.annotation.PreDestroy; - -@ManagedBean("AManagedBean") -public class AManagedBean { - - public int identityHashCode() { - return System.identityHashCode(this); - } - - // @SuppressWarnings("unused") - // @PostConstruct - // private void postConstruct() { - // Helper.getLogger().info("In PostConstruct of " + this); - // } - - @SuppressWarnings("unused") - @PreDestroy - private void preDestroy() { - Helper.getLogger().info("In PreDestroy of " + this); - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/Client.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/Client.java deleted file mode 100644 index 22fac4c08b..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/Client.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle; - -import java.util.HashSet; -import java.util.Set; - -import com.sun.ts.tests.ejb30.common.helper.Helper; -import com.sun.ts.tests.ejb30.common.helper.ServiceLocator; -import com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorIF; - -import jakarta.annotation.PreDestroy; -import jakarta.annotation.Resource; - -public class Client extends - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.ClientBase { - - private InterceptorIF bean; - - private InterceptorIF overrideBean; - - private InterceptorIF override34Bean; - - @Override - protected InterceptorIF getBean() { - return bean; - } - - @Override - protected InterceptorIF getOverride34Bean() { - return override34Bean; - } - - @Override - protected InterceptorIF getOverrideBean() { - return overrideBean; - } - - @SuppressWarnings("unused") - @PreDestroy - private void preDestroy() { - Helper.getLogger().info("In PreDestroy of " + this); - } - - @Resource(lookup = "java:module/InterceptorBean", type = InterceptorBean.class) - protected void setBean(InterceptorIF b) { - bean = b; - } - - @Resource(lookup = "java:module/InterceptorOverrideBean", type = InterceptorOverrideBean.class) - protected void setOverrideBean(InterceptorIF b) { - overrideBean = b; - } - - @Resource(lookup = "java:module/InterceptorOverride34Bean", type = InterceptorOverride34Bean.class) - protected void setOverride34Bean(InterceptorIF b) { - override34Bean = b; - } - - /* - * @testName: allInterceptors - * - * @test_Strategy: all interceptors class-level should be invoked, as well as - * PostConstruct methods on bean class. For Interceptor8, the PostConstruct - * methods from super and super-super classes are overridden and therefore are - * not invoked. - */ - /* - * @testName: overrideBeanInterceptorMethod - * - * @test_Strategy: If a PostConstruct method is overridden, it is no longer - * invoked. This test override with a non-PostConstruct method. This test also - * excludes default and class-level interceptors. - */ - /* - * @testName: overrideBeanInterceptorMethod3 - * - * @test_Strategy: If a PostConstruct method is overridden, it is no longer - * invoked. This test override with a PostConstruct method. - */ - - /* - * @testName: identityHashCode - * - * @test_Strategy: - */ - public void identityHashCode() { - Set instances = new HashSet(); - for (int i = 0; i < 50; i++) { - AManagedBean b = (AManagedBean) ServiceLocator - .lookupNoTry("java:module/AManagedBean"); - int c = b.identityHashCode(); - assertEquals("Existing instance: " + b + "?", false, - instances.contains(c)); - instances.add(c); - } - appendReason(instances); - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/ClientEjblitejspTest.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/ClientEjblitejspTest.java deleted file mode 100644 index b8be42fdda..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/ClientEjblitejspTest.java +++ /dev/null @@ -1,169 +0,0 @@ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle; - -import com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.Client; -import java.net.URL; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.OperateOnDeployment; -import org.jboss.arquillian.container.test.api.OverProtocol; -import org.jboss.arquillian.container.test.api.TargetsContainer; -import org.jboss.arquillian.junit5.ArquillianExtension; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.StringAsset; -import org.jboss.shrinkwrap.api.exporter.ZipExporter; -import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.junit.jupiter.api.MethodOrderer; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestMethodOrder; -import org.junit.jupiter.api.extension.ExtendWith; -import tck.arquillian.porting.lib.spi.TestArchiveProcessor; -import tck.arquillian.protocol.common.TargetVehicle; - - - -@ExtendWith(ArquillianExtension.class) -@Tag("platform") -@Tag("ejb_web") -@Tag("web") -@Tag("tck-javatest") - -@TestMethodOrder(MethodOrderer.MethodName.class) -public class ClientEjblitejspTest extends com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.Client { - static final String VEHICLE_ARCHIVE = "ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsp_vehicle"; - - /** - EE10 Deployment Descriptors: - ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsf_vehicle_web: WEB-INF/beans.xml,WEB-INF/faces-config.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsp_vehicle_web: - ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet_vehicle_web: WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet2_vehicle_web: WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsf_vehicle_web: WEB-INF/beans.xml,WEB-INF/faces-config.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsp_vehicle_web: WEB-INF/beans.xml - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet_vehicle_web: WEB-INF/beans.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet2_vehicle_web: WEB-INF/beans.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecycleejbcdi_ejblitejsf_vehicle_web: WEB-INF/beans.xml,WEB-INF/faces-config.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecycleejbcdi_ejblitejsp_vehicle_web: WEB-INF/beans.xml - ejblite_packaging_war_mbean_interceptor_lifecycleejbcdi_ejbliteservlet_vehicle_web: WEB-INF/beans.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecycleejbcdi_ejbliteservlet2_vehicle_web: WEB-INF/beans.xml,WEB-INF/web.xml - - Found Descriptors: - War: - - */ - @TargetsContainer("tck-javatest") - @OverProtocol("javatest") - @Deployment(name = VEHICLE_ARCHIVE, order = 2) - public static WebArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) { - - // War - // the war with the correct archive name - WebArchive ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsp_vehicle_web = ShrinkWrap.create(WebArchive.class, "ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsp_vehicle_web.war"); - // The class files - ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsp_vehicle_web.addClasses( - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.InterceptorOverride34Bean.class, - com.sun.ts.lib.harness.EETest.Fault.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor3.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorBeanBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor5.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.JsfClient.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorBaseBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor8.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.InterceptorBean.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor1.class, - com.sun.ts.tests.common.vehicle.VehicleRunnable.class, - com.sun.ts.tests.ejb30.common.helper.Helper.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteClientBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.HttpServletDelegate.class, - com.sun.ts.lib.harness.EETest.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.InterceptorOverrideBean.class, - com.sun.ts.lib.harness.ServiceEETest.class, - com.sun.ts.tests.common.vehicle.VehicleClient.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor6.class, - com.sun.ts.tests.ejb30.common.lite.NumberIF.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteClientIF.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor4.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.ClientBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.Client.class, - com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorBase.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.ReasonableStatus.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor9.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.HistorySingletonBean.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor7.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.AManagedBean.class, - com.sun.ts.tests.ejb30.common.lite.NumberEnum.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorOverrideBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.EJBLiteJSPTag.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteJsfClientBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorIF.class, - com.sun.ts.tests.ejb30.common.helper.ServiceLocator.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor2.class, - com.sun.ts.lib.harness.EETest.SetupException.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.JsfClientBase.class - ); - // The web.xml descriptor - URL warResURL = Client.class.getResource("/vehicle/ejblitejsp/ejblitejsp_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsp_vehicle_web.addAsWebInfResource(warResURL, "web.xml"); - } - // The sun-web.xml descriptor - warResURL = Client.class.getResource("//vehicle/ejblitejsp/ejblitejsp_vehicle_web.war.sun-web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsp_vehicle_web.addAsWebInfResource(warResURL, "sun-web.xml"); - } - - // Any libraries added to the war - - // Web content - warResURL = Client.class.getResource("/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/ejblitejsp.tld"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsp_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/tlds/ejblitejsp.tld"); - } - warResURL = Client.class.getResource("/com/sun/ts/tests/common/vehicle/ejblitejsp/ejblitejsp.tld"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsp_vehicle_web.addAsWebResource(warResURL, "/ejblitejsp.tld"); - } - warResURL = Client.class.getResource("/com/sun/ts/tests/common/vehicle/ejblitejsp/ejblitejsp_vehicle.jsp"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsp_vehicle_web.addAsWebResource(warResURL, "/ejblitejsp_vehicle.jsp"); - } - - // Call the archive processor - archiveProcessor.processWebArchive(ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsp_vehicle_web, Client.class, warResURL); - - return ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsp_vehicle_web; - } - - @Test - @Override - @TargetVehicle("ejblitejsp") - public void allInterceptors() { - super.allInterceptors(); - } - - @Test - @Override - @TargetVehicle("ejblitejsp") - public void overrideBeanInterceptorMethod() { - super.overrideBeanInterceptorMethod(); - } - - @Test - @Override - @TargetVehicle("ejblitejsp") - public void overrideBeanInterceptorMethod3() { - super.overrideBeanInterceptorMethod3(); - } - - @Test - @Override - @TargetVehicle("ejblitejsp") - public void identityHashCode() { - super.identityHashCode(); - } - - -} \ No newline at end of file diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/ClientEjbliteservlet2Test.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/ClientEjbliteservlet2Test.java deleted file mode 100644 index fb12489169..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/ClientEjbliteservlet2Test.java +++ /dev/null @@ -1,166 +0,0 @@ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle; - -import com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.Client; -import java.net.URL; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.OperateOnDeployment; -import org.jboss.arquillian.container.test.api.OverProtocol; -import org.jboss.arquillian.container.test.api.TargetsContainer; -import org.jboss.arquillian.junit5.ArquillianExtension; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.StringAsset; -import org.jboss.shrinkwrap.api.exporter.ZipExporter; -import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.junit.jupiter.api.MethodOrderer; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestMethodOrder; -import org.junit.jupiter.api.extension.ExtendWith; -import tck.arquillian.porting.lib.spi.TestArchiveProcessor; -import tck.arquillian.protocol.common.TargetVehicle; - - - -@ExtendWith(ArquillianExtension.class) -@Tag("platform") -@Tag("ejb_web") -@Tag("web") -@Tag("tck-javatest") - -@TestMethodOrder(MethodOrderer.MethodName.class) -public class ClientEjbliteservlet2Test extends com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.Client { - static final String VEHICLE_ARCHIVE = "ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet2_vehicle"; - - /** - EE10 Deployment Descriptors: - ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsf_vehicle_web: WEB-INF/beans.xml,WEB-INF/faces-config.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsp_vehicle_web: - ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet_vehicle_web: WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet2_vehicle_web: WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsf_vehicle_web: WEB-INF/beans.xml,WEB-INF/faces-config.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsp_vehicle_web: WEB-INF/beans.xml - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet_vehicle_web: WEB-INF/beans.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet2_vehicle_web: WEB-INF/beans.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecycleejbcdi_ejblitejsf_vehicle_web: WEB-INF/beans.xml,WEB-INF/faces-config.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecycleejbcdi_ejblitejsp_vehicle_web: WEB-INF/beans.xml - ejblite_packaging_war_mbean_interceptor_lifecycleejbcdi_ejbliteservlet_vehicle_web: WEB-INF/beans.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecycleejbcdi_ejbliteservlet2_vehicle_web: WEB-INF/beans.xml,WEB-INF/web.xml - - Found Descriptors: - War: - - /com/sun/ts/tests/common/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle_web.xml - */ - @TargetsContainer("tck-javatest") - @OverProtocol("javatest") - @Deployment(name = VEHICLE_ARCHIVE, order = 2) - public static WebArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) { - - // War - // the war with the correct archive name - WebArchive ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet2_vehicle_web = ShrinkWrap.create(WebArchive.class, "ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet2_vehicle_web.war"); - // The class files - ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet2_vehicle_web.addClasses( - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.InterceptorOverride34Bean.class, - com.sun.ts.lib.harness.EETest.Fault.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor3.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorBeanBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor5.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.JsfClient.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorBaseBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor8.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.InterceptorBean.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor1.class, - com.sun.ts.tests.common.vehicle.VehicleRunnable.class, - com.sun.ts.tests.ejb30.common.helper.Helper.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteClientBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.HttpServletDelegate.class, - com.sun.ts.lib.harness.EETest.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.InterceptorOverrideBean.class, - com.sun.ts.lib.harness.ServiceEETest.class, - com.sun.ts.tests.common.vehicle.VehicleClient.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor6.class, - com.sun.ts.tests.ejb30.common.lite.NumberIF.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteClientIF.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor4.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.ClientBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.Client.class, - com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorBase.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.ReasonableStatus.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor9.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.EJBLiteServlet2Filter.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.HistorySingletonBean.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor7.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.AManagedBean.class, - com.sun.ts.tests.ejb30.common.lite.NumberEnum.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorOverrideBase.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteJsfClientBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorIF.class, - com.sun.ts.tests.ejb30.common.helper.ServiceLocator.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor2.class, - com.sun.ts.lib.harness.EETest.SetupException.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.JsfClientBase.class - ); - // The web.xml descriptor - URL warResURL = Client.class.getResource("ejbliteservlet2_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet2_vehicle_web.addAsWebInfResource(warResURL, "web.xml"); - } - // The sun-web.xml descriptor - warResURL = Client.class.getResource("/ejbliteservlet2_vehicle_web.war.sun-web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet2_vehicle_web.addAsWebInfResource(warResURL, "sun-web.xml"); - } - - // Any libraries added to the war - - // Web content - warResURL = Client.class.getResource("/com/sun/ts/tests/common/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet2_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/ejbliteservlet2_vehicle_web.xml"); - } - warResURL = Client.class.getResource("/com/sun/ts/tests/common/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle.jsp"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet2_vehicle_web.addAsWebResource(warResURL, "/ejbliteservlet2_vehicle.jsp"); - } - - // Call the archive processor - archiveProcessor.processWebArchive(ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet2_vehicle_web, Client.class, warResURL); - - return ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet2_vehicle_web; - } - - @Test - @Override - @TargetVehicle("ejbliteservlet2") - public void allInterceptors() { - super.allInterceptors(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet2") - public void overrideBeanInterceptorMethod() { - super.overrideBeanInterceptorMethod(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet2") - public void overrideBeanInterceptorMethod3() { - super.overrideBeanInterceptorMethod3(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet2") - public void identityHashCode() { - super.identityHashCode(); - } - - -} \ No newline at end of file diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/ClientEjbliteservletTest.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/ClientEjbliteservletTest.java deleted file mode 100644 index adb7b828e6..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/ClientEjbliteservletTest.java +++ /dev/null @@ -1,162 +0,0 @@ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle; - -import com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.Client; -import java.net.URL; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.OperateOnDeployment; -import org.jboss.arquillian.container.test.api.OverProtocol; -import org.jboss.arquillian.container.test.api.TargetsContainer; -import org.jboss.arquillian.junit5.ArquillianExtension; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.StringAsset; -import org.jboss.shrinkwrap.api.exporter.ZipExporter; -import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.junit.jupiter.api.MethodOrderer; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestMethodOrder; -import org.junit.jupiter.api.extension.ExtendWith; -import tck.arquillian.porting.lib.spi.TestArchiveProcessor; -import tck.arquillian.protocol.common.TargetVehicle; - - - -@ExtendWith(ArquillianExtension.class) -@Tag("platform") -@Tag("ejb_web") -@Tag("web") -@Tag("tck-javatest") - -@TestMethodOrder(MethodOrderer.MethodName.class) -public class ClientEjbliteservletTest extends com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.Client { - static final String VEHICLE_ARCHIVE = "ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet_vehicle"; - - /** - EE10 Deployment Descriptors: - ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsf_vehicle_web: WEB-INF/beans.xml,WEB-INF/faces-config.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsp_vehicle_web: - ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet_vehicle_web: WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet2_vehicle_web: WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsf_vehicle_web: WEB-INF/beans.xml,WEB-INF/faces-config.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsp_vehicle_web: WEB-INF/beans.xml - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet_vehicle_web: WEB-INF/beans.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet2_vehicle_web: WEB-INF/beans.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecycleejbcdi_ejblitejsf_vehicle_web: WEB-INF/beans.xml,WEB-INF/faces-config.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecycleejbcdi_ejblitejsp_vehicle_web: WEB-INF/beans.xml - ejblite_packaging_war_mbean_interceptor_lifecycleejbcdi_ejbliteservlet_vehicle_web: WEB-INF/beans.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecycleejbcdi_ejbliteservlet2_vehicle_web: WEB-INF/beans.xml,WEB-INF/web.xml - - Found Descriptors: - War: - - /com/sun/ts/tests/common/vehicle/ejbliteservlet/ejbliteservlet_vehicle_web.xml - */ - @TargetsContainer("tck-javatest") - @OverProtocol("javatest") - @Deployment(name = VEHICLE_ARCHIVE, order = 2) - public static WebArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) { - - // War - // the war with the correct archive name - WebArchive ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet_vehicle_web = ShrinkWrap.create(WebArchive.class, "ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet_vehicle_web.war"); - // The class files - ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet_vehicle_web.addClasses( - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.InterceptorOverride34Bean.class, - com.sun.ts.lib.harness.EETest.Fault.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor3.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorBeanBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor5.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.JsfClient.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorBaseBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor8.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.InterceptorBean.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor1.class, - com.sun.ts.tests.common.vehicle.VehicleRunnable.class, - com.sun.ts.tests.ejb30.common.helper.Helper.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteClientBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.HttpServletDelegate.class, - com.sun.ts.lib.harness.EETest.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.InterceptorOverrideBean.class, - com.sun.ts.lib.harness.ServiceEETest.class, - com.sun.ts.tests.common.vehicle.VehicleClient.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor6.class, - com.sun.ts.tests.ejb30.common.lite.NumberIF.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteClientIF.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor4.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.ClientBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.Client.class, - com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorBase.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.ReasonableStatus.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor9.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.HistorySingletonBean.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor7.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.AManagedBean.class, - com.sun.ts.tests.ejb30.common.lite.NumberEnum.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorOverrideBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.EJBLiteServletVehicle.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteJsfClientBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorIF.class, - com.sun.ts.tests.ejb30.common.helper.ServiceLocator.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor2.class, - com.sun.ts.lib.harness.EETest.SetupException.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.JsfClientBase.class - ); - // The web.xml descriptor - URL warResURL = Client.class.getResource("ejbliteservlet_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet_vehicle_web.addAsWebInfResource(warResURL, "web.xml"); - } - // The sun-web.xml descriptor - warResURL = Client.class.getResource("/ejbliteservlet_vehicle_web.war.sun-web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet_vehicle_web.addAsWebInfResource(warResURL, "sun-web.xml"); - } - - // Any libraries added to the war - - // Web content - warResURL = Client.class.getResource("/com/sun/ts/tests/common/vehicle/ejbliteservlet/ejbliteservlet_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/ejbliteservlet_vehicle_web.xml"); - } - - // Call the archive processor - archiveProcessor.processWebArchive(ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet_vehicle_web, Client.class, warResURL); - - return ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet_vehicle_web; - } - - @Test - @Override - @TargetVehicle("ejbliteservlet") - public void allInterceptors() { - super.allInterceptors(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet") - public void overrideBeanInterceptorMethod() { - super.overrideBeanInterceptorMethod(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet") - public void overrideBeanInterceptorMethod3() { - super.overrideBeanInterceptorMethod3(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet") - public void identityHashCode() { - super.identityHashCode(); - } - - -} \ No newline at end of file diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/EJBLiteJSPTag.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/EJBLiteJSPTag.java deleted file mode 100644 index 8404707884..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/EJBLiteJSPTag.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle; - -import jakarta.servlet.jsp.JspContext; -import jakarta.servlet.jsp.JspWriter; -import jakarta.servlet.jsp.JspException; -import jakarta.servlet.jsp.tagext.JspFragment; -import jakarta.servlet.jsp.tagext.JspTag; -import jakarta.servlet.jsp.PageContext; -import jakarta.servlet.jsp.tagext.SimpleTag; -import java.io.IOException; - -public class EJBLiteJSPTag extends Client implements SimpleTag { - /** Reference to the enclosing tag. */ - private JspTag parentTag; - - /** The JSP context for the upcoming tag invocation. */ - private JspContext jspContext; - - /** The body of the tag. */ - private JspFragment jspBody; - - /** - * Called by the container to invoke this tag. - * The implementation of this method is provided by the tag library developer, - * and handles all tag processing, body iteration, etc. - */ - public void doTag() throws JspException { - JspWriter out = getJspContext().getOut(); - setModuleName( - ((PageContext) getJspContext()).getServletContext().getContextPath() ); - String sta = getStatus(); //to trigger the test run - getJspContext().setAttribute("statusAndReason", sta + " " + getReason()); - JspFragment f = getJspBody(); - if (f != null) { - try { - f.invoke(out); - } catch (IOException e) { - throw new JspException(e); - } - } - } - - /** - * Sets the parent of this tag, for collaboration purposes. - *

- * The container invokes this method only if this tag invocation is - * nested within another tag invocation. - * - * @param parent the tag that encloses this tag - */ - public void setParent(JspTag parent) { - this.parentTag = parent; - } - - /** - * Returns the parent of this tag, for collaboration purposes. - * - * @return the parent of this tag - */ - public JspTag getParent() { - return this.parentTag; - } - - /** - * Stores the provided JSP context in the private jspContext field. - * Subclasses can access the JspContext via - * getJspContext(). - * - * @param pc the page context for this invocation - * @see SimpleTag#setJspContext - */ - public void setJspContext(JspContext pc) { - this.jspContext = pc; - } - - /** - * Returns the page context passed in by the container via - * setJspContext. - * - * @return the page context for this invocation - */ - protected JspContext getJspContext() { - return this.jspContext; - } - - /** - * Stores the provided JspFragment. - * - * @param jspBody The fragment encapsulating the body of this tag. - * If the action element is empty in the page, this method is - * not called at all. - * @see SimpleTag#setJspBody - */ - public void setJspBody(JspFragment jspBody) { - this.jspBody = jspBody; - } - - /** - * Returns the body passed in by the container via setJspBody. - * - * @return the fragment encapsulating the body of this tag, or - * null if the action element is empty in the page. - */ - protected JspFragment getJspBody() { - return this.jspBody; - } - -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/EJBLiteServlet2Filter.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/EJBLiteServlet2Filter.java deleted file mode 100644 index af4d02a46f..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/EJBLiteServlet2Filter.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle; - -import java.io.IOException; -import java.io.PrintWriter; -import jakarta.servlet.Filter; -import jakarta.servlet.FilterChain; -import jakarta.servlet.FilterConfig; -import jakarta.servlet.ServletException; -import jakarta.servlet.ServletRequest; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.ServletResponse; -import java.util.logging.Logger; -import java.util.logging.Level; - -public class EJBLiteServlet2Filter extends Client implements Filter { - private static Logger logger = Logger.getLogger(EJBLiteServlet2Filter.class.getName()); - private FilterConfig filterConfig; - - public void doFilter(ServletRequest request, ServletResponse response, - FilterChain chain) - throws IOException, ServletException { - response.setContentType("text/plain"); - setInjectionSupported(true); - String tn = request.getParameter("testName"); - if(logger.isLoggable(Level.FINE)) { - logger.fine("doFilter testName=" + tn); - } - setTestName(tn); - setModuleName( ((HttpServletRequest) request).getContextPath() ); - String sta = getStatus(); //to trigger the test run - PrintWriter pw = response.getWriter(); - pw.println(sta + " " + getReason()); - cleanup(); //need to reset all fields since filter instances are shared - //skip the rest of the chain - } - - public void destroy() { - } - - public void init(FilterConfig filterConfig) { - this.filterConfig = filterConfig; - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/EJBLiteServletVehicle.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/EJBLiteServletVehicle.java deleted file mode 100644 index 3498e1f5d0..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/EJBLiteServletVehicle.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle; - -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Enumeration; -import java.util.Iterator; -import jakarta.servlet.Servlet; -import jakarta.servlet.http.HttpServlet; -import jakarta.servlet.ServletContext; -import jakarta.servlet.ServletException; -import jakarta.servlet.ServletRequest; -import jakarta.servlet.ServletResponse; -import java.util.logging.Logger; -import java.util.logging.Level; -import jakarta.servlet.ServletConfig; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; - -public class EJBLiteServletVehicle extends Client - implements Servlet, ServletConfig { - - private static Logger logger = Logger.getLogger(EJBLiteServletVehicle.class.getName()); - - private HttpServletDelegate delegate = new HttpServletDelegate(); - - public void init(ServletConfig config) throws ServletException { - delegate.init(config); - } - - public ServletConfig getServletConfig() { - return delegate.getServletConfig(); - } - - public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException { - delegate.service(request, response); - - setInjectionSupported(true); - String tn = request.getParameter("testName"); - logger.fine("EJBLiteServletVehicle processing request testName=" + tn); - setTestName(tn); - setModuleName(getServletContext().getContextPath()); - String sta = getStatus(); //to trigger the test run - - PrintWriter pw = response.getWriter(); - pw.println(sta + " " + getReason()); - cleanup(); //need to reset all fields since servlet instances are shared - - } - - public String getServletInfo() { - return delegate.getServletInfo(); - } - - public void destroy() { - delegate.destroy(); - delegate = null; - } - - public String getServletName() { - return delegate.getServletName(); - } - - public ServletContext getServletContext() { - return delegate.getServletContext(); - } - - public String getInitParameter(String arg0) { - return delegate.getInitParameter(arg0); - } - - public Enumeration getInitParameterNames() { - return delegate.getInitParameterNames(); - } - - -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/HttpServletDelegate.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/HttpServletDelegate.java deleted file mode 100644 index da73ae940e..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/HttpServletDelegate.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - - package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle; - -import java.io.IOException; -import java.io.PrintWriter; -import jakarta.servlet.ServletException; -import java.util.logging.Logger; -import java.util.logging.Level; -import jakarta.servlet.http.HttpServlet; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; - -public class HttpServletDelegate extends HttpServlet { - - private static Logger logger = Logger.getLogger(HttpServletDelegate.class.getName()); - - @Override - protected void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - processRequest(request, response); - } - - @Override - protected void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - processRequest(request, response); - } - - private void processRequest(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - response.setContentType("text/plain"); - } - } diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/InterceptorBean.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/InterceptorBean.java deleted file mode 100644 index 20fdc9b9a7..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/InterceptorBean.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle; - -import java.util.logging.Level; - -import com.sun.ts.tests.ejb30.common.helper.Helper; -import com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor1; -import com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor2; -import com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor3; -import com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor4; -import com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor5; -import com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor8; -import com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorBeanBase; -import com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorIF; - -import jakarta.annotation.ManagedBean; -import jakarta.annotation.PostConstruct; -import jakarta.interceptor.Interceptors; - -//2, 1 & 3 are prepended here to replace default interceptors. In other -//test directories (e.g., lite/interceptor/singleton/lifecycle/annotated, -//2, 1 & 3 are specified as default interceptors. -@ManagedBean("InterceptorBean") -@Interceptors({ Interceptor2.class, Interceptor1.class, Interceptor3.class, - Interceptor5.class, Interceptor4.class, Interceptor8.class }) -public class InterceptorBean extends InterceptorBeanBase - implements InterceptorIF { - private static final String simpleName = "InterceptorBean"; - - @SuppressWarnings("unused") - @PostConstruct - private void postConstruct() { - Helper.getLogger().logp(Level.FINE, simpleName, "postConstruct", - "Adding to postConstruct record: " + simpleName); - historySingletonBean.addPostConstructRecordFor(this, simpleName); - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/InterceptorOverride34Bean.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/InterceptorOverride34Bean.java deleted file mode 100644 index 942f537652..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/InterceptorOverride34Bean.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle; - -import com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorBeanBase; -import com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorIF; - -import jakarta.annotation.ManagedBean; -import jakarta.annotation.PostConstruct; -import jakarta.interceptor.ExcludeDefaultInterceptors; - -@ManagedBean("InterceptorOverride34Bean") -@ExcludeDefaultInterceptors -public class InterceptorOverride34Bean extends InterceptorBeanBase - implements InterceptorIF { - private static final String simpleName = "InterceptorOverride34Bean"; - - @Override // override superclass' PostConstruct method with a PostConstruct - // method - @PostConstruct - protected void postConstructInInterceptorBeanBase() { - historySingletonBean.addPostConstructRecordFor(this, simpleName); - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/InterceptorOverrideBean.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/InterceptorOverrideBean.java deleted file mode 100644 index 9b78c49333..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/InterceptorOverrideBean.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle; - -import com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorBeanBase; -import com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorIF; - -import jakarta.annotation.ManagedBean; -import jakarta.annotation.PostConstruct; -import jakarta.interceptor.ExcludeDefaultInterceptors; - -@ManagedBean("InterceptorOverrideBean") -@ExcludeDefaultInterceptors -public class InterceptorOverrideBean extends InterceptorBeanBase - implements InterceptorIF { - - private static final String simpleName = "InterceptorOverrideBean"; - - @PostConstruct - protected void postConstruct() { - historySingletonBean.addPostConstructRecordFor(this, simpleName); - } - - @Override // override the superclass' PostConstruct method with a - // non-PostConstruct method - protected void postConstructInInterceptorBeanBase() { - throw new RuntimeException( - "Overriding the superclass' PostConstruct method with a non-PostConstruct method, and neither is to be called."); - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/JsfClient.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/JsfClient.java deleted file mode 100644 index 966d7afe7b..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/JsfClient.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle; - -import java.io.Serializable; -import java.util.HashSet; -import java.util.Set; - -import com.sun.ts.tests.ejb30.common.helper.Helper; -import com.sun.ts.tests.ejb30.common.helper.ServiceLocator; -import com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorIF; -import jakarta.annotation.PreDestroy; -import jakarta.annotation.Resource; - -@jakarta.inject.Named("client") -@jakarta.enterprise.context.RequestScoped -public class JsfClient extends - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.JsfClientBase implements Serializable { - - private static final long serialVersionUID = 1L; - - private InterceptorIF bean; - - private InterceptorIF overrideBean; - - private InterceptorIF override34Bean; - - @Override - protected InterceptorIF getBean() { - return bean; - } - - @Override - protected InterceptorIF getOverride34Bean() { - return override34Bean; - } - - @Override - protected InterceptorIF getOverrideBean() { - return overrideBean; - } - - @SuppressWarnings("unused") - @PreDestroy - private void preDestroy() { - Helper.getLogger().info("In PreDestroy of " + this); - } - - @Resource(lookup = "java:module/InterceptorBean", type = InterceptorBean.class) - protected void setBean(InterceptorIF b) { - bean = b; - } - - @Resource(lookup = "java:module/InterceptorOverrideBean", type = InterceptorOverrideBean.class) - protected void setOverrideBean(InterceptorIF b) { - overrideBean = b; - } - - @Resource(lookup = "java:module/InterceptorOverride34Bean", type = InterceptorOverride34Bean.class) - protected void setOverride34Bean(InterceptorIF b) { - override34Bean = b; - } - - /* - * @testName: allInterceptors - * - * @test_Strategy: all interceptors class-level should be invoked, as well as - * PostConstruct methods on bean class. For Interceptor8, the PostConstruct - * methods from super and super-super classes are overridden and therefore are - * not invoked. - */ - /* - * @testName: overrideBeanInterceptorMethod - * - * @test_Strategy: If a PostConstruct method is overridden, it is no longer - * invoked. This test override with a non-PostConstruct method. This test also - * excludes default and class-level interceptors. - */ - /* - * @testName: overrideBeanInterceptorMethod3 - * - * @test_Strategy: If a PostConstruct method is overridden, it is no longer - * invoked. This test override with a PostConstruct method. - */ - - /* - * @testName: identityHashCode - * - * @test_Strategy: - */ - public void identityHashCode() { - Set instances = new HashSet(); - for (int i = 0; i < 50; i++) { - AManagedBean b = (AManagedBean) ServiceLocator - .lookupNoTry("java:module/AManagedBean"); - int c = b.identityHashCode(); - assertEquals("Existing instance: " + b + "?", false, - instances.contains(c)); - instances.add(c); - } - appendReason(instances); - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/JsfClientEjblitejsfTest.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/JsfClientEjblitejsfTest.java deleted file mode 100644 index ac8eda3fd6..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/JsfClientEjblitejsfTest.java +++ /dev/null @@ -1,181 +0,0 @@ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle; - -import com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.JsfClient; -import java.net.URL; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.OperateOnDeployment; -import org.jboss.arquillian.container.test.api.OverProtocol; -import org.jboss.arquillian.container.test.api.TargetsContainer; -import org.jboss.arquillian.junit5.ArquillianExtension; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.StringAsset; -import org.jboss.shrinkwrap.api.exporter.ZipExporter; -import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.junit.jupiter.api.MethodOrderer; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestMethodOrder; -import org.junit.jupiter.api.extension.ExtendWith; -import tck.arquillian.porting.lib.spi.TestArchiveProcessor; -import tck.arquillian.protocol.common.TargetVehicle; - - - -@ExtendWith(ArquillianExtension.class) -@Tag("platform") -@Tag("ejb_web") -@Tag("web") -@Tag("tck-javatest") - -@TestMethodOrder(MethodOrderer.MethodName.class) -public class JsfClientEjblitejsfTest extends com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.JsfClient { - static final String VEHICLE_ARCHIVE = "ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsf_vehicle"; - - /** - EE10 Deployment Descriptors: - ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsf_vehicle_web: WEB-INF/beans.xml,WEB-INF/faces-config.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsp_vehicle_web: - ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet_vehicle_web: WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecycle_ejbliteservlet2_vehicle_web: WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsf_vehicle_web: WEB-INF/beans.xml,WEB-INF/faces-config.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsp_vehicle_web: WEB-INF/beans.xml - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet_vehicle_web: WEB-INF/beans.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet2_vehicle_web: WEB-INF/beans.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecycleejbcdi_ejblitejsf_vehicle_web: WEB-INF/beans.xml,WEB-INF/faces-config.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecycleejbcdi_ejblitejsp_vehicle_web: WEB-INF/beans.xml - ejblite_packaging_war_mbean_interceptor_lifecycleejbcdi_ejbliteservlet_vehicle_web: WEB-INF/beans.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecycleejbcdi_ejbliteservlet2_vehicle_web: WEB-INF/beans.xml,WEB-INF/web.xml - - Found Descriptors: - War: - - /com/sun/ts/tests/common/vehicle/ejblitejsf/ejblitejsf_vehicle_web.xml - */ - @TargetsContainer("tck-javatest") - @OverProtocol("javatest") - @Deployment(name = VEHICLE_ARCHIVE, order = 2) - public static WebArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) { - - // War - // the war with the correct archive name - WebArchive ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsf_vehicle_web = ShrinkWrap.create(WebArchive.class, "ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsf_vehicle_web.war"); - // The class files - ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsf_vehicle_web.addClasses( - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.InterceptorOverride34Bean.class, - com.sun.ts.lib.harness.EETest.Fault.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor3.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorBeanBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor5.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.JsfClient.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorBaseBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor8.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.InterceptorBean.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor1.class, - com.sun.ts.tests.common.vehicle.VehicleRunnable.class, - com.sun.ts.tests.ejb30.common.helper.Helper.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteClientBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.HttpServletDelegate.class, - com.sun.ts.lib.harness.EETest.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.InterceptorOverrideBean.class, - com.sun.ts.lib.harness.ServiceEETest.class, - com.sun.ts.tests.common.vehicle.VehicleClient.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor6.class, - com.sun.ts.tests.ejb30.common.lite.NumberIF.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteClientIF.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor4.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.ClientBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.Client.class, - com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorBase.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.ReasonableStatus.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor9.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.HistorySingletonBean.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor7.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.AManagedBean.class, - com.sun.ts.tests.ejb30.common.lite.NumberEnum.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorOverrideBase.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteJsfClientBase.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.InterceptorIF.class, - com.sun.ts.tests.ejb30.common.helper.ServiceLocator.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.Interceptor2.class, - com.sun.ts.lib.harness.EETest.SetupException.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.JsfClientBase.class - ); - // The web.xml descriptor - URL warResURL = JsfClient.class.getResource("/com/sun/ts/tests/common/vehicle/ejblitejsf/ejblitejsf_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsf_vehicle_web.addAsWebInfResource(warResURL, "web.xml"); - } - // The sun-web.xml descriptor - warResURL = JsfClient.class.getResource("//com/sun/ts/tests/common/vehicle/ejblitejsf/ejblitejsf_vehicle_web.war.sun-web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsf_vehicle_web.addAsWebInfResource(warResURL, "sun-web.xml"); - } - - // Any libraries added to the war - - // Web content - warResURL = JsfClient.class.getResource("/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/beans.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsf_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/beans.xml"); - } - warResURL = JsfClient.class.getResource("/com/sun/ts/tests/common/vehicle/ejblitejsf/beans.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsf_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/beans.xml"); - } - warResURL = JsfClient.class.getResource("/com/sun/ts/tests/common/vehicle/ejblitejsf/ejblitejsf_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsf_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/ejblitejsf_vehicle_web.xml"); - } - warResURL = JsfClient.class.getResource("/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/faces-config.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsf_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/faces-config.xml"); - } - warResURL = JsfClient.class.getResource("/com/sun/ts/tests/common/vehicle/ejblitejsf/faces-config.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsf_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/faces-config.xml"); - } - warResURL = JsfClient.class.getResource("/com/sun/ts/tests/common/vehicle/ejblitejsf/ejblitejsf_vehicle.xhtml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsf_vehicle_web.addAsWebResource(warResURL, "/ejblitejsf_vehicle.xhtml"); - } - - // Call the archive processor - archiveProcessor.processWebArchive(ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsf_vehicle_web, JsfClient.class, warResURL); - - return ejblite_packaging_war_mbean_interceptor_lifecycle_ejblitejsf_vehicle_web; - } - - @Test - @Override - @TargetVehicle("ejblitejsf") - public void allInterceptors() { - super.allInterceptors(); - } - - @Test - @Override - @TargetVehicle("ejblitejsf") - public void overrideBeanInterceptorMethod() { - super.overrideBeanInterceptorMethod(); - } - - @Test - @Override - @TargetVehicle("ejblitejsf") - public void overrideBeanInterceptorMethod3() { - super.overrideBeanInterceptorMethod3(); - } - - @Test - @Override - @TargetVehicle("ejblitejsf") - public void identityHashCode() { - super.identityHashCode(); - } - - -} \ No newline at end of file diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/build.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/build.xml deleted file mode 100644 index a2eb9e9417..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/build.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/ejblitejsp.tld b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/ejblitejsp.tld deleted file mode 100644 index dbe23476be..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/ejblitejsp.tld +++ /dev/null @@ -1,45 +0,0 @@ - - - - - 1.0 - ejblitejsp - /WEB-INF/tlds/ejblitejsp - - EJBLiteJSPTag - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.EJBLiteJSPTag - scriptless - - to display return value of getReason() - statusAndReason - - - testName - true - true - java.lang.String - - - injectionSupported - true - true - java.lang.Boolean - - - diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/ejbliteservlet2_vehicle_web.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/ejbliteservlet2_vehicle_web.xml deleted file mode 100644 index dba893148e..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/ejbliteservlet2_vehicle_web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - EJBLiteServlet2Filter - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.EJBLiteServlet2Filter - - - EJBLiteServlet2Filter - ejbliteservlet2_vehicle.jsp - - - ejbliteservlet2_vehicle.jsp - /ejbliteservlet2_vehicle.jsp - - - ejbliteservlet2_vehicle.jsp - /ejbliteservlet2_vehicle.jsp - - diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/ejbliteservlet_vehicle_web.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/ejbliteservlet_vehicle_web.xml deleted file mode 100644 index 969a3372b3..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecycle/ejbliteservlet_vehicle_web.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - EJBLiteServletVehicle - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecycle.EJBLiteServletVehicle - - - EJBLiteServletVehicle - /ejbliteservlet_vehicle.jsp - - diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/Client.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/Client.java deleted file mode 100644 index 7214483d6e..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/Client.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi; - -import java.util.List; - -import com.sun.ts.tests.ejb30.common.helper.Helper; -import com.sun.ts.tests.ejb30.common.lite.EJBLiteClientBase; - -import jakarta.annotation.Resource; - -/** - * This test directory contains an empty beans.xml that will be packaged in WAR - * as WEB-INF/beans.xml. This is to verify when CDI is enabled, the overriding - * of ManagedBean's lifecycle methods still works. The similar tests without - * beans.xml are in ../lifecycle. - */ -public class Client extends EJBLiteClientBase { - - @Resource - private OverrideBean overrideBean; - - @Resource - private OverrideWithPostConstructBean overrideWithPostConstructBean; - - /* - * @testName: overrideWithRegularMethod - * - * @test_Strategy: If a PostConstruct method is overridden, it is no longer - * invoked. This test override with a non-PostConstruct method. This test also - * excludes default and class-level interceptors. - */ - public void overrideWithRegularMethod() { - checkPostConstructRecords(overrideBean, new String[] { "OverrideBean" }); - } - - /* - * @testName: overrideWithPostConstructBean - * - * @test_Strategy: If a PostConstruct method is overridden, it is no longer - * invoked. This test override with a PostConstruct method. - */ - public void overrideWithPostConstructBean() { - checkPostConstructRecords(overrideWithPostConstructBean, - new String[] { "OverrideWithPostConstructBean" }); - } - - protected void checkPostConstructRecords(OverrideBeanBase b, - String[] expectedPostConstruct) { - List actualPostConstruct = b.getPostConstructRecords(); - appendReason( - Helper.compareResultList(expectedPostConstruct, actualPostConstruct)); - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/ClientEjblitejspTest.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/ClientEjblitejspTest.java deleted file mode 100644 index 9408ddc4ae..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/ClientEjblitejspTest.java +++ /dev/null @@ -1,132 +0,0 @@ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi; - -import com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.Client; -import java.net.URL; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.OperateOnDeployment; -import org.jboss.arquillian.container.test.api.OverProtocol; -import org.jboss.arquillian.container.test.api.TargetsContainer; -import org.jboss.arquillian.junit5.ArquillianExtension; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.StringAsset; -import org.jboss.shrinkwrap.api.exporter.ZipExporter; -import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.junit.jupiter.api.MethodOrderer; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestMethodOrder; -import org.junit.jupiter.api.extension.ExtendWith; -import tck.arquillian.porting.lib.spi.TestArchiveProcessor; -import tck.arquillian.protocol.common.TargetVehicle; - - - -@ExtendWith(ArquillianExtension.class) -@Tag("platform") -@Tag("ejb_web") -@Tag("web") -@Tag("tck-javatest") - -@TestMethodOrder(MethodOrderer.MethodName.class) -public class ClientEjblitejspTest extends com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.Client { - static final String VEHICLE_ARCHIVE = "ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsp_vehicle"; - - /** - EE10 Deployment Descriptors: - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsf_vehicle_web: WEB-INF/beans.xml,WEB-INF/faces-config.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsp_vehicle_web: WEB-INF/beans.xml - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet_vehicle_web: WEB-INF/beans.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet2_vehicle_web: WEB-INF/beans.xml,WEB-INF/web.xml - - Found Descriptors: - War: - - */ - @TargetsContainer("tck-javatest") - @OverProtocol("javatest") - @Deployment(name = VEHICLE_ARCHIVE, order = 2) - public static WebArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) { - - // War - // the war with the correct archive name - WebArchive ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsp_vehicle_web = ShrinkWrap.create(WebArchive.class, "ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsp_vehicle_web.war"); - // The class files - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsp_vehicle_web.addClasses( - com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteClientIF.class, - com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.HttpServletDelegate.class, - com.sun.ts.lib.harness.EETest.Fault.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.ReasonableStatus.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.OverrideBeanBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.OverrideWithPostConstructBean.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.HistorySingletonBean.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.EJBLiteJSPTag.class, - com.sun.ts.tests.common.vehicle.VehicleRunnable.class, - com.sun.ts.tests.ejb30.common.lite.NumberEnum.class, - com.sun.ts.tests.ejb30.common.helper.Helper.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteClientBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.Client.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteJsfClientBase.class, - com.sun.ts.lib.harness.EETest.class, - com.sun.ts.lib.harness.ServiceEETest.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.OverrideBean.class, - com.sun.ts.lib.harness.EETest.SetupException.class, - com.sun.ts.tests.common.vehicle.VehicleClient.class, - com.sun.ts.tests.ejb30.common.lite.NumberIF.class - ); - // The web.xml descriptor - URL warResURL = Client.class.getResource("/vehicle/ejblitejsp/ejblitejsp_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsp_vehicle_web.addAsWebInfResource(warResURL, "web.xml"); - } - // The sun-web.xml descriptor - warResURL = Client.class.getResource("//vehicle/ejblitejsp/ejblitejsp_vehicle_web.war.sun-web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsp_vehicle_web.addAsWebInfResource(warResURL, "sun-web.xml"); - } - - // Any libraries added to the war - - // Web content - warResURL = Client.class.getResource("/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/beans.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsp_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/beans.xml"); - } - warResURL = Client.class.getResource("/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/ejblitejsp.tld"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsp_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/tlds/ejblitejsp.tld"); - } - warResURL = Client.class.getResource("/com/sun/ts/tests/common/vehicle/ejblitejsp/ejblitejsp.tld"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsp_vehicle_web.addAsWebResource(warResURL, "/ejblitejsp.tld"); - } - warResURL = Client.class.getResource("/com/sun/ts/tests/common/vehicle/ejblitejsp/ejblitejsp_vehicle.jsp"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsp_vehicle_web.addAsWebResource(warResURL, "/ejblitejsp_vehicle.jsp"); - } - - // Call the archive processor - archiveProcessor.processWebArchive(ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsp_vehicle_web, Client.class, warResURL); - - return ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsp_vehicle_web; - } - - @Test - @Override - @TargetVehicle("ejblitejsp") - public void overrideWithRegularMethod() { - super.overrideWithRegularMethod(); - } - - @Test - @Override - @TargetVehicle("ejblitejsp") - public void overrideWithPostConstructBean() { - super.overrideWithPostConstructBean(); - } - - -} \ No newline at end of file diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/ClientEjbliteservlet2Test.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/ClientEjbliteservlet2Test.java deleted file mode 100644 index 673c933435..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/ClientEjbliteservlet2Test.java +++ /dev/null @@ -1,129 +0,0 @@ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi; - -import com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.Client; -import java.net.URL; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.OperateOnDeployment; -import org.jboss.arquillian.container.test.api.OverProtocol; -import org.jboss.arquillian.container.test.api.TargetsContainer; -import org.jboss.arquillian.junit5.ArquillianExtension; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.StringAsset; -import org.jboss.shrinkwrap.api.exporter.ZipExporter; -import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.junit.jupiter.api.MethodOrderer; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestMethodOrder; -import org.junit.jupiter.api.extension.ExtendWith; -import tck.arquillian.porting.lib.spi.TestArchiveProcessor; -import tck.arquillian.protocol.common.TargetVehicle; - - - -@ExtendWith(ArquillianExtension.class) -@Tag("platform") -@Tag("ejb_web") -@Tag("web") -@Tag("tck-javatest") - -@TestMethodOrder(MethodOrderer.MethodName.class) -public class ClientEjbliteservlet2Test extends com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.Client { - static final String VEHICLE_ARCHIVE = "ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet2_vehicle"; - - /** - EE10 Deployment Descriptors: - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsf_vehicle_web: WEB-INF/beans.xml,WEB-INF/faces-config.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsp_vehicle_web: WEB-INF/beans.xml - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet_vehicle_web: WEB-INF/beans.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet2_vehicle_web: WEB-INF/beans.xml,WEB-INF/web.xml - - Found Descriptors: - War: - - /com/sun/ts/tests/common/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle_web.xml - */ - @TargetsContainer("tck-javatest") - @OverProtocol("javatest") - @Deployment(name = VEHICLE_ARCHIVE, order = 2) - public static WebArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) { - - // War - // the war with the correct archive name - WebArchive ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet2_vehicle_web = ShrinkWrap.create(WebArchive.class, "ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet2_vehicle_web.war"); - // The class files - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet2_vehicle_web.addClasses( - com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteClientIF.class, - com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.HttpServletDelegate.class, - com.sun.ts.lib.harness.EETest.Fault.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.ReasonableStatus.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.OverrideBeanBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.OverrideWithPostConstructBean.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.HistorySingletonBean.class, - com.sun.ts.tests.common.vehicle.VehicleRunnable.class, - com.sun.ts.tests.ejb30.common.lite.NumberEnum.class, - com.sun.ts.tests.ejb30.common.helper.Helper.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteClientBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.Client.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteJsfClientBase.class, - com.sun.ts.lib.harness.EETest.class, - com.sun.ts.lib.harness.ServiceEETest.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.EJBLiteServlet2Filter.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.OverrideBean.class, - com.sun.ts.lib.harness.EETest.SetupException.class, - com.sun.ts.tests.common.vehicle.VehicleClient.class, - com.sun.ts.tests.ejb30.common.lite.NumberIF.class - ); - // The web.xml descriptor - URL warResURL = Client.class.getResource("ejbliteservlet2_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet2_vehicle_web.addAsWebInfResource(warResURL, "web.xml"); - } - // The sun-web.xml descriptor - warResURL = Client.class.getResource("/ejbliteservlet2_vehicle_web.war.sun-web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet2_vehicle_web.addAsWebInfResource(warResURL, "sun-web.xml"); - } - - // Any libraries added to the war - - // Web content - warResURL = Client.class.getResource("/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/beans.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet2_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/beans.xml"); - } - warResURL = Client.class.getResource("/com/sun/ts/tests/common/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet2_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/ejbliteservlet2_vehicle_web.xml"); - } - warResURL = Client.class.getResource("/com/sun/ts/tests/common/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle.jsp"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet2_vehicle_web.addAsWebResource(warResURL, "/ejbliteservlet2_vehicle.jsp"); - } - - // Call the archive processor - archiveProcessor.processWebArchive(ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet2_vehicle_web, Client.class, warResURL); - - return ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet2_vehicle_web; - } - - @Test - @Override - @TargetVehicle("ejbliteservlet2") - public void overrideWithRegularMethod() { - super.overrideWithRegularMethod(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet2") - public void overrideWithPostConstructBean() { - super.overrideWithPostConstructBean(); - } - - -} \ No newline at end of file diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/ClientEjbliteservletTest.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/ClientEjbliteservletTest.java deleted file mode 100644 index c7d565c32a..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/ClientEjbliteservletTest.java +++ /dev/null @@ -1,125 +0,0 @@ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi; - -import com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.Client; -import java.net.URL; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.OperateOnDeployment; -import org.jboss.arquillian.container.test.api.OverProtocol; -import org.jboss.arquillian.container.test.api.TargetsContainer; -import org.jboss.arquillian.junit5.ArquillianExtension; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.StringAsset; -import org.jboss.shrinkwrap.api.exporter.ZipExporter; -import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.junit.jupiter.api.MethodOrderer; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestMethodOrder; -import org.junit.jupiter.api.extension.ExtendWith; -import tck.arquillian.porting.lib.spi.TestArchiveProcessor; -import tck.arquillian.protocol.common.TargetVehicle; - - - -@ExtendWith(ArquillianExtension.class) -@Tag("platform") -@Tag("ejb_web") -@Tag("web") -@Tag("tck-javatest") - -@TestMethodOrder(MethodOrderer.MethodName.class) -public class ClientEjbliteservletTest extends com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.Client { - static final String VEHICLE_ARCHIVE = "ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet_vehicle"; - - /** - EE10 Deployment Descriptors: - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsf_vehicle_web: WEB-INF/beans.xml,WEB-INF/faces-config.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejblitejsp_vehicle_web: WEB-INF/beans.xml - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet_vehicle_web: WEB-INF/beans.xml,WEB-INF/web.xml - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet2_vehicle_web: WEB-INF/beans.xml,WEB-INF/web.xml - - Found Descriptors: - War: - - /com/sun/ts/tests/common/vehicle/ejbliteservlet/ejbliteservlet_vehicle_web.xml - */ - @TargetsContainer("tck-javatest") - @OverProtocol("javatest") - @Deployment(name = VEHICLE_ARCHIVE, order = 2) - public static WebArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) { - - // War - // the war with the correct archive name - WebArchive ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet_vehicle_web = ShrinkWrap.create(WebArchive.class, "ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet_vehicle_web.war"); - // The class files - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet_vehicle_web.addClasses( - com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteClientIF.class, - com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.HttpServletDelegate.class, - com.sun.ts.lib.harness.EETest.Fault.class, - com.sun.ts.tests.common.vehicle.ejbliteshare.ReasonableStatus.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.OverrideBeanBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.OverrideWithPostConstructBean.class, - com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.HistorySingletonBean.class, - com.sun.ts.tests.common.vehicle.VehicleRunnable.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.EJBLiteServletVehicle.class, - com.sun.ts.tests.ejb30.common.lite.NumberEnum.class, - com.sun.ts.tests.ejb30.common.helper.Helper.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteClientBase.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.Client.class, - com.sun.ts.tests.ejb30.common.lite.EJBLiteJsfClientBase.class, - com.sun.ts.lib.harness.EETest.class, - com.sun.ts.lib.harness.ServiceEETest.class, - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.OverrideBean.class, - com.sun.ts.lib.harness.EETest.SetupException.class, - com.sun.ts.tests.common.vehicle.VehicleClient.class, - com.sun.ts.tests.ejb30.common.lite.NumberIF.class - ); - // The web.xml descriptor - URL warResURL = Client.class.getResource("ejbliteservlet_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet_vehicle_web.addAsWebInfResource(warResURL, "web.xml"); - } - // The sun-web.xml descriptor - warResURL = Client.class.getResource("/ejbliteservlet_vehicle_web.war.sun-web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet_vehicle_web.addAsWebInfResource(warResURL, "sun-web.xml"); - } - - // Any libraries added to the war - - // Web content - warResURL = Client.class.getResource("/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/beans.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/beans.xml"); - } - warResURL = Client.class.getResource("/com/sun/ts/tests/common/vehicle/ejbliteservlet/ejbliteservlet_vehicle_web.xml"); - if(warResURL != null) { - ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet_vehicle_web.addAsWebResource(warResURL, "/WEB-INF/ejbliteservlet_vehicle_web.xml"); - } - - // Call the archive processor - archiveProcessor.processWebArchive(ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet_vehicle_web, Client.class, warResURL); - - return ejblite_packaging_war_mbean_interceptor_lifecyclecdi_ejbliteservlet_vehicle_web; - } - - @Test - @Override - @TargetVehicle("ejbliteservlet") - public void overrideWithRegularMethod() { - super.overrideWithRegularMethod(); - } - - @Test - @Override - @TargetVehicle("ejbliteservlet") - public void overrideWithPostConstructBean() { - super.overrideWithPostConstructBean(); - } - - -} \ No newline at end of file diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/EJBLiteJSPTag.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/EJBLiteJSPTag.java deleted file mode 100644 index 42ae6a03a8..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/EJBLiteJSPTag.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi; - -import jakarta.servlet.jsp.JspContext; -import jakarta.servlet.jsp.JspWriter; -import jakarta.servlet.jsp.JspException; -import jakarta.servlet.jsp.tagext.JspFragment; -import jakarta.servlet.jsp.tagext.JspTag; -import jakarta.servlet.jsp.PageContext; -import jakarta.servlet.jsp.tagext.SimpleTag; -import java.io.IOException; - -public class EJBLiteJSPTag extends Client implements SimpleTag { - /** Reference to the enclosing tag. */ - private JspTag parentTag; - - /** The JSP context for the upcoming tag invocation. */ - private JspContext jspContext; - - /** The body of the tag. */ - private JspFragment jspBody; - - /** - * Called by the container to invoke this tag. - * The implementation of this method is provided by the tag library developer, - * and handles all tag processing, body iteration, etc. - */ - public void doTag() throws JspException { - JspWriter out = getJspContext().getOut(); - setModuleName( - ((PageContext) getJspContext()).getServletContext().getContextPath() ); - String sta = getStatus(); //to trigger the test run - getJspContext().setAttribute("statusAndReason", sta + " " + getReason()); - JspFragment f = getJspBody(); - if (f != null) { - try { - f.invoke(out); - } catch (IOException e) { - throw new JspException(e); - } - } - } - - /** - * Sets the parent of this tag, for collaboration purposes. - *

- * The container invokes this method only if this tag invocation is - * nested within another tag invocation. - * - * @param parent the tag that encloses this tag - */ - public void setParent(JspTag parent) { - this.parentTag = parent; - } - - /** - * Returns the parent of this tag, for collaboration purposes. - * - * @return the parent of this tag - */ - public JspTag getParent() { - return this.parentTag; - } - - /** - * Stores the provided JSP context in the private jspContext field. - * Subclasses can access the JspContext via - * getJspContext(). - * - * @param pc the page context for this invocation - * @see SimpleTag#setJspContext - */ - public void setJspContext(JspContext pc) { - this.jspContext = pc; - } - - /** - * Returns the page context passed in by the container via - * setJspContext. - * - * @return the page context for this invocation - */ - protected JspContext getJspContext() { - return this.jspContext; - } - - /** - * Stores the provided JspFragment. - * - * @param jspBody The fragment encapsulating the body of this tag. - * If the action element is empty in the page, this method is - * not called at all. - * @see SimpleTag#setJspBody - */ - public void setJspBody(JspFragment jspBody) { - this.jspBody = jspBody; - } - - /** - * Returns the body passed in by the container via setJspBody. - * - * @return the fragment encapsulating the body of this tag, or - * null if the action element is empty in the page. - */ - protected JspFragment getJspBody() { - return this.jspBody; - } - -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/EJBLiteServlet2Filter.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/EJBLiteServlet2Filter.java deleted file mode 100644 index c78f5557ad..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/EJBLiteServlet2Filter.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi; - -import java.io.IOException; -import java.io.PrintWriter; -import jakarta.servlet.Filter; -import jakarta.servlet.FilterChain; -import jakarta.servlet.FilterConfig; -import jakarta.servlet.ServletException; -import jakarta.servlet.ServletRequest; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.ServletResponse; -import java.util.logging.Logger; -import java.util.logging.Level; - -public class EJBLiteServlet2Filter extends Client implements Filter { - private static Logger logger = Logger.getLogger(EJBLiteServlet2Filter.class.getName()); - private FilterConfig filterConfig; - - public void doFilter(ServletRequest request, ServletResponse response, - FilterChain chain) - throws IOException, ServletException { - response.setContentType("text/plain"); - setInjectionSupported(true); - String tn = request.getParameter("testName"); - if(logger.isLoggable(Level.FINE)) { - logger.fine("doFilter testName=" + tn); - } - setTestName(tn); - setModuleName( ((HttpServletRequest) request).getContextPath() ); - String sta = getStatus(); //to trigger the test run - PrintWriter pw = response.getWriter(); - pw.println(sta + " " + getReason()); - cleanup(); //need to reset all fields since filter instances are shared - //skip the rest of the chain - } - - public void destroy() { - } - - public void init(FilterConfig filterConfig) { - this.filterConfig = filterConfig; - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/EJBLiteServletVehicle.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/EJBLiteServletVehicle.java deleted file mode 100644 index 398ba6fdba..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/EJBLiteServletVehicle.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi; - -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Enumeration; -import java.util.Iterator; -import jakarta.servlet.Servlet; -import jakarta.servlet.http.HttpServlet; -import jakarta.servlet.ServletContext; -import jakarta.servlet.ServletException; -import jakarta.servlet.ServletRequest; -import jakarta.servlet.ServletResponse; -import java.util.logging.Logger; -import java.util.logging.Level; -import jakarta.servlet.ServletConfig; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; - -public class EJBLiteServletVehicle extends Client - implements Servlet, ServletConfig { - - private static Logger logger = Logger.getLogger(EJBLiteServletVehicle.class.getName()); - - private HttpServletDelegate delegate = new HttpServletDelegate(); - - public void init(ServletConfig config) throws ServletException { - delegate.init(config); - } - - public ServletConfig getServletConfig() { - return delegate.getServletConfig(); - } - - public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException { - delegate.service(request, response); - - setInjectionSupported(true); - String tn = request.getParameter("testName"); - logger.fine("EJBLiteServletVehicle processing request testName=" + tn); - setTestName(tn); - setModuleName(getServletContext().getContextPath()); - String sta = getStatus(); //to trigger the test run - - PrintWriter pw = response.getWriter(); - pw.println(sta + " " + getReason()); - cleanup(); //need to reset all fields since servlet instances are shared - - } - - public String getServletInfo() { - return delegate.getServletInfo(); - } - - public void destroy() { - delegate.destroy(); - delegate = null; - } - - public String getServletName() { - return delegate.getServletName(); - } - - public ServletContext getServletContext() { - return delegate.getServletContext(); - } - - public String getInitParameter(String arg0) { - return delegate.getInitParameter(arg0); - } - - public Enumeration getInitParameterNames() { - return delegate.getInitParameterNames(); - } - - -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/HttpServletDelegate.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/HttpServletDelegate.java deleted file mode 100644 index 001908b559..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/HttpServletDelegate.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - - package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi; - -import java.io.IOException; -import java.io.PrintWriter; -import jakarta.servlet.ServletException; -import java.util.logging.Logger; -import java.util.logging.Level; -import jakarta.servlet.http.HttpServlet; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; - -public class HttpServletDelegate extends HttpServlet { - - private static Logger logger = Logger.getLogger(HttpServletDelegate.class.getName()); - - @Override - protected void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - processRequest(request, response); - } - - @Override - protected void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - processRequest(request, response); - } - - private void processRequest(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - response.setContentType("text/plain"); - } - } diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/OverrideBean.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/OverrideBean.java deleted file mode 100644 index 711665ec4c..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/OverrideBean.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi; - -import com.sun.ts.tests.ejb30.common.helper.Helper; - -import jakarta.annotation.ManagedBean; -import jakarta.annotation.PostConstruct; -import jakarta.annotation.PreDestroy; - -@ManagedBean("OverrideBean") -public class OverrideBean extends OverrideBeanBase { - private static final String simpleName = "OverrideBean"; - - // @PostConstruct //override with a non-PostConstruct, neither is invoked - @Override - public void postConstructInOverrideBeanBase() { - historySingletonBean.addPostConstructRecordFor(this, - "should not reach here: OverrideBean.postConstructInOverrideBeanBase"); - } - - @Override - // @PreDestroy //override with a non-PreDestroy method, neither is invoked - public void preDestroyInOverrideBeanBase() { - historySingletonBean.addPostConstructRecordFor(this, - "should not reach here: OverrideBean.preDestroyInOverrideBeanBase"); - } - - @SuppressWarnings("unused") - @PostConstruct - private void postConstruct() { - historySingletonBean.addPostConstructRecordFor(this, simpleName); - } - - @SuppressWarnings("unused") - @PreDestroy - private void preDestroy() { - Helper.getLogger().info("In preDestroy of " + this); - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/OverrideBeanBase.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/OverrideBeanBase.java deleted file mode 100644 index 791795d427..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/OverrideBeanBase.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi; - -import java.util.List; - -import com.sun.ts.tests.ejb30.common.helper.Helper; -import com.sun.ts.tests.ejb30.lite.interceptor.common.lifecycle.HistorySingletonBean; - -import jakarta.annotation.PostConstruct; -import jakarta.annotation.PreDestroy; -import jakarta.ejb.EJB; - -public class OverrideBeanBase { - private static final String simpleName = "OverrideBeanBase"; - - @EJB(name = "historySingletonBean") - protected HistorySingletonBean historySingletonBean; - - @PostConstruct - protected void postConstructInOverrideBeanBase() { - historySingletonBean.addPostConstructRecordFor(this, - OverrideBeanBase.simpleName); - } - - @PreDestroy - protected void preDestroyInOverrideBeanBase() { - Helper.getLogger().info("In preDestroyInOverrideBeanBase of " + this); - } - - public List getPostConstructRecords() { - return historySingletonBean.getPostConstructRecordsFor(this); - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/OverrideWithPostConstructBean.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/OverrideWithPostConstructBean.java deleted file mode 100644 index 8386c8ef30..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/OverrideWithPostConstructBean.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi; - -import com.sun.ts.tests.ejb30.common.helper.Helper; - -import jakarta.annotation.ManagedBean; -import jakarta.annotation.PostConstruct; -import jakarta.annotation.PreDestroy; - -@ManagedBean("OverrideWithPostConstructBean") -public class OverrideWithPostConstructBean extends OverrideBeanBase { - private static final String simpleName = "OverrideWithPostConstructBean"; - - @PostConstruct - @Override - protected void postConstructInOverrideBeanBase() { - historySingletonBean.addPostConstructRecordFor(this, simpleName); - } - - @Override - @PreDestroy - protected void preDestroyInOverrideBeanBase() { - Helper.getLogger().info("In preDestroyInOverrideBeanBase of " + this); - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/beans.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/beans.xml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/build.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/build.xml deleted file mode 100644 index f93c116622..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/build.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/ejblitejsp.tld b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/ejblitejsp.tld deleted file mode 100644 index 212c09a1a9..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/ejblitejsp.tld +++ /dev/null @@ -1,45 +0,0 @@ - - - - - 1.0 - ejblitejsp - /WEB-INF/tlds/ejblitejsp - - EJBLiteJSPTag - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.EJBLiteJSPTag - scriptless - - to display return value of getReason() - statusAndReason - - - testName - true - true - java.lang.String - - - injectionSupported - true - true - java.lang.Boolean - - - diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/ejbliteservlet2_vehicle_web.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/ejbliteservlet2_vehicle_web.xml deleted file mode 100644 index f488fca204..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/ejbliteservlet2_vehicle_web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - EJBLiteServlet2Filter - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.EJBLiteServlet2Filter - - - EJBLiteServlet2Filter - ejbliteservlet2_vehicle.jsp - - - ejbliteservlet2_vehicle.jsp - /ejbliteservlet2_vehicle.jsp - - - ejbliteservlet2_vehicle.jsp - /ejbliteservlet2_vehicle.jsp - - diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/ejbliteservlet_vehicle_web.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/ejbliteservlet_vehicle_web.xml deleted file mode 100644 index 9e9b35ec3f..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/lite/packaging/war/mbean/interceptor/lifecyclecdi/ejbliteservlet_vehicle_web.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - EJBLiteServletVehicle - com.sun.ts.tests.ejb30.lite.packaging.war.mbean.interceptor.lifecyclecdi.EJBLiteServletVehicle - - - EJBLiteServletVehicle - /ejbliteservlet_vehicle.jsp - - diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/misc/moduleName/appclientejb/Client.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/misc/moduleName/appclientejb/Client.java index 17fbbf7439..b92ffcbf9b 100644 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/misc/moduleName/appclientejb/Client.java +++ b/ejb30/src/main/java/com/sun/ts/tests/ejb30/misc/moduleName/appclientejb/Client.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024 Contributors to the Eclipse Foundation * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -39,14 +40,6 @@ public class Client extends EETest { @EJB private static AppResRemoteIF moduleBean; - // Not to inject ModuleMBean in appclient. Need to figure out if and how it - // works. - // (remote access to the mbean packaged in ejb jar? double package the mbean - // in both - // appclient and ejb jar?) - // @Resource(lookup="java:app/renamed_appclientejb_ejb/ModuleMBean") - // private static AppResRemoteIF moduleMBean; - public static void main(String[] args) { Client theTests = new Client(); Status s = theTests.run(args, System.out, System.err); @@ -62,14 +55,6 @@ public void cleanup() { @SuppressWarnings("unused") @PostConstruct private static void postConstruct() { - lookupShouldFail("java:module/ModuleMBean", postConstructRecords); - lookupShouldFail( - "java:app/ejb3_misc_moduleName_appclientejb_client/ModuleMBean", - postConstructRecords); - lookupShouldFail( - "java:app/ejb3_misc_moduleName_appclientejb_ejb/ModuleMBean", - postConstructRecords); - lookupShouldFail("java:module/ModuleBean", postConstructRecords); lookupShouldFail( "java:app/ejb3_misc_moduleName_appclientejb_client/ModuleBean", @@ -84,11 +69,9 @@ private static void postConstruct() { Helper.getLogger().info(postConstructRecords.toString()); Helper.assertNotEquals(null, null, moduleBean, postConstructRecords); - // Helper.assertNotEquals(null, null, moduleMBean, postConstructRecords); AppResRemoteIF lookupResult = null; String[] names = { - // "java:app/renamed_appclientejb_ejb/ModuleMBean", "java:app/renamed_appclientejb_ejb/ModuleBean", "java:global/ejb3_misc_moduleName_appclientejb/renamed_appclientejb_ejb/ModuleBean" }; for (String name : names) { diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/misc/moduleName/appclientejb/ClientTest.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/misc/moduleName/appclientejb/ClientTest.java index 02ec34079e..b22e3c9aab 100644 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/misc/moduleName/appclientejb/ClientTest.java +++ b/ejb30/src/main/java/com/sun/ts/tests/ejb30/misc/moduleName/appclientejb/ClientTest.java @@ -82,8 +82,7 @@ public static EnterpriseArchive createDeployment(@ArquillianResource TestArchive JavaArchive ejb3_misc_moduleName_appclientejb_ejb = ShrinkWrap.create(JavaArchive.class, "ejb3_misc_moduleName_appclientejb_ejb.jar"); // The class files ejb3_misc_moduleName_appclientejb_ejb.addClasses( - com.sun.ts.tests.ejb30.misc.moduleName.appclientejb.ModuleBean.class, - com.sun.ts.tests.ejb30.misc.moduleName.appclientejb.ModuleMBean.class + com.sun.ts.tests.ejb30.misc.moduleName.appclientejb.ModuleBean.class ); // The ejb-jar.xml descriptor URL ejbResURL = Client.class.getResource("/com/sun/ts/tests/ejb30/misc/moduleName/appclientejb/ejb3_misc_moduleName_appclientejb_ejb.xml"); diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/misc/moduleName/appclientejb/ModuleBean.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/misc/moduleName/appclientejb/ModuleBean.java index 4f94a5747f..ff5c4a2753 100644 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/misc/moduleName/appclientejb/ModuleBean.java +++ b/ejb30/src/main/java/com/sun/ts/tests/ejb30/misc/moduleName/appclientejb/ModuleBean.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024 Contributors to the Eclipse Foundation * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -36,19 +37,9 @@ public class ModuleBean extends AppResBeanBase implements AppResRemoteIF { @EJB private AppResRemoteIF moduleBean; - @Resource - private ModuleMBean moduleMBean; - @SuppressWarnings("unused") @PostConstruct private void postConstruct() { - lookupShouldFail( - "java:app/ejb3_misc_moduleName_appclientejb_client/ModuleMBean", - postConstructRecords); - lookupShouldFail( - "java:app/ejb3_misc_moduleName_appclientejb_ejb/ModuleMBean", - postConstructRecords); - lookupShouldFail( "java:app/ejb3_misc_moduleName_appclientejb_client/ModuleBean", postConstructRecords); @@ -62,11 +53,9 @@ private void postConstruct() { Helper.getLogger().info(postConstructRecords.toString()); Helper.assertNotEquals(null, null, moduleBean, postConstructRecords); - Helper.assertNotEquals(null, null, moduleMBean, postConstructRecords); AppResRemoteIF lookupResult = null; - String[] names = { "java:module/ModuleMBean", "java:module/ModuleBean", - "java:app/renamed_appclientejb_ejb/ModuleMBean", + String[] names = { "java:module/ModuleBean", "java:app/renamed_appclientejb_ejb/ModuleBean", "java:global/ejb3_misc_moduleName_appclientejb/renamed_appclientejb_ejb/ModuleBean" }; for (String name : names) { diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/misc/moduleName/appclientejb/ModuleMBean.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/misc/moduleName/appclientejb/ModuleMBean.java deleted file mode 100644 index 6f0a0bb835..0000000000 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/misc/moduleName/appclientejb/ModuleMBean.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.ejb30.misc.moduleName.appclientejb; - -import static com.sun.ts.tests.ejb30.common.helper.ServiceLocator.lookupNoTry; - -import com.sun.ts.tests.ejb30.assembly.appres.common.AppResBeanBase; -import com.sun.ts.tests.ejb30.assembly.appres.common.AppResRemoteIF; -import com.sun.ts.tests.ejb30.common.helper.Helper; - -import jakarta.annotation.ManagedBean; -import jakarta.annotation.PostConstruct; - -@ManagedBean("ModuleMBean") -public class ModuleMBean extends AppResBeanBase implements AppResRemoteIF { - - @SuppressWarnings("unused") - @PostConstruct - private void postConstruct() { - String lookup = "java:module/ModuleName"; - String moduleName = (String) lookupNoTry(lookup); - Helper.assertEquals("Check " + lookup, "renamed_appclientejb_ejb", - moduleName, postConstructRecords); - Helper.getLogger().info("Looked up " + lookup + ": " + moduleName); - } -} diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/misc/moduleName/appclientejb/build.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/misc/moduleName/appclientejb/build.xml index 927d340ebd..4307504796 100644 --- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/misc/moduleName/appclientejb/build.xml +++ b/ejb30/src/main/java/com/sun/ts/tests/ejb30/misc/moduleName/appclientejb/build.xml @@ -2,6 +2,7 @@