Skip to content

Commit

Permalink
Migrate appclient and assembly to EJB 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
brideck committed Mar 30, 2024
1 parent 080b999 commit 8e7abd6
Show file tree
Hide file tree
Showing 342 changed files with 599 additions and 11,841 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2018, 2022 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2018, 2024 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -22,7 +22,6 @@
<ejb-ref>
<ejb-ref-name>ejb/TestBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.sun.ts.tests.appclient.deploy.compat.TestBeanHome</home>
<remote>com.sun.ts.tests.appclient.deploy.compat.TestBean</remote>
<ejb-link>TestBean</ejb-link>
</ejb-ref>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2018, 2022 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2018, 2024 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -18,12 +18,12 @@
-->

<application xmlns="https://jakarta.ee/xml/ns/jakartaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="10" xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/application_10.xsd">
<display-name>appclient_dep_compat12_13</display-name>
<display-name>appclient_dep_compat9_10</display-name>
<module>
<java>appclient_dep_compat12_13_client.jar</java>
<java>appclient_dep_compat9_10_client.jar</java>
</module>
<module>
<ejb>appclient_dep_compat12_13_ejb.jar</ejb>
<ejb>appclient_dep_compat9_10_ejb.jar</ejb>
</module>
</application>

Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,7 @@
public interface TestBean {
public void initLogging(Properties p);

public void createNamingContext();

public boolean ping();
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
*/
package com.sun.ts.tests.appclient.deploy.compat9_10;

import com.sun.ts.tests.common.ejb.wrappers.StatelessWrapper;
import com.sun.ts.tests.common.ejb.wrappers.Stateless3xWrapper;

public class TestBeanEJB extends StatelessWrapper {
public class TestBeanEJB extends Stateless3xWrapper {

public boolean ping() {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<ts.ejbjar descriptor="META-INF/ejb-jar.xml"
archivename="appclient_dep_compat9_10">
<fileset dir="${class.dir}" includes="${pkg.dir}/T*.class,
${wrapper.dir}/StatelessWrapper.class"/>
${wrapper.dir}/Stateless3xWrapper.class"/>
</ts.ejbjar>

<ts.clientjar descriptor="META-INF/application-client.xml"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -20,13 +20,12 @@

package com.sun.ts.tests.appclient.deploy.ejblink.casesens;

import java.rmi.RemoteException;
import java.util.Properties;

import jakarta.ejb.EJBObject;
public interface CaseBean {
public void initLogging(Properties p);

public interface CaseBean extends EJBObject {
public void initLogging(Properties p) throws RemoteException;
public void createNamingContext();

public String whoAreYou() throws RemoteException;
public String whoAreYou();
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -20,13 +20,11 @@
package com.sun.ts.tests.appclient.deploy.ejblink.casesens;

import com.sun.ts.tests.assembly.util.shared.ejbref.common.ReferencedBeanCode;
import com.sun.ts.tests.common.ejb.wrappers.StatelessWrapper;
import com.sun.ts.tests.common.ejb.wrappers.Stateless3xWrapper;

import jakarta.ejb.EJBException;
public class CaseBeanEJB extends Stateless3xWrapper {

public class CaseBeanEJB extends StatelessWrapper {

public String whoAreYou() throws EJBException {
public String whoAreYou() {
return ReferencedBeanCode.whoAreYou(nctx);
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -86,8 +86,6 @@ public void setup(String[] args, Properties props) throws Exception {
* the EJB references were resolved correctly).
*/
public void testCaseSensitivity() throws Exception {
CaseBeanHome home1 = null;
CaseBeanHome home2 = null;
CaseBean bean1 = null;
CaseBean bean2 = null;
String bean1Name;
Expand All @@ -96,20 +94,18 @@ public void testCaseSensitivity() throws Exception {

try {
TestUtil.logTrace("[Client] Looking up '" + bean1Lookup + "'...");
home1 = (CaseBeanHome) nctx.lookup(bean1Lookup, CaseBeanHome.class);
bean1 = home1.create();
bean1 = (CaseBean) nctx.lookup(bean1Lookup, CaseBean.class);
bean1.createNamingContext();
bean1.initLogging(props);
bean1Name = bean1.whoAreYou();
TestUtil.logTrace(bean1Lookup + "name is '" + bean1Name + "'");
bean1.remove();

TestUtil.logTrace("[Client] Looking up '" + bean2Lookup + "'...");
home2 = (CaseBeanHome) nctx.lookup(bean2Lookup, CaseBeanHome.class);
bean2 = home2.create();
bean2 = (CaseBean) nctx.lookup(bean2Lookup, CaseBean.class);
bean2.createNamingContext();
bean2.initLogging(props);
bean2Name = bean2.whoAreYou();
TestUtil.logTrace(bean2Lookup + " name is '" + bean2Name + "'");
bean2.remove();

pass = bean1Name.equals(bean1RefName) && bean2Name.equals(bean2RefName);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2018, 2022 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2018, 2024 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -23,14 +23,12 @@
<ejb-ref>
<ejb-ref-name>ejb/Samba</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.sun.ts.tests.appclient.deploy.ejblink.casesens.CaseBeanHome</home>
<remote>com.sun.ts.tests.appclient.deploy.ejblink.casesens.CaseBean</remote>
<ejb-link>Heaven</ejb-link>
</ejb-ref>
<ejb-ref>
<ejb-ref-name>ejb/Bossa</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.sun.ts.tests.appclient.deploy.ejblink.casesens.CaseBeanHome</home>
<remote>com.sun.ts.tests.appclient.deploy.ejblink.casesens.CaseBean</remote>
<ejb-link>heaven</ejb-link>
</ejb-ref>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2018, 2024 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -22,8 +22,7 @@
<enterprise-beans>
<session>
<ejb-name>heaven</ejb-name>
<home>com.sun.ts.tests.appclient.deploy.ejblink.casesens.CaseBeanHome</home>
<remote>com.sun.ts.tests.appclient.deploy.ejblink.casesens.CaseBean</remote>
<business-remote>com.sun.ts.tests.appclient.deploy.ejblink.casesens.CaseBean</business-remote>
<ejb-class>com.sun.ts.tests.appclient.deploy.ejblink.casesens.CaseBeanEJB</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
Expand All @@ -38,8 +37,7 @@
</session>
<session>
<ejb-name>Heaven</ejb-name>
<home>com.sun.ts.tests.appclient.deploy.ejblink.casesens.CaseBeanHome</home>
<remote>com.sun.ts.tests.appclient.deploy.ejblink.casesens.CaseBean</remote>
<business-remote>com.sun.ts.tests.appclient.deploy.ejblink.casesens.CaseBean</business-remote>
<ejb-class>com.sun.ts.tests.appclient.deploy.ejblink.casesens.CaseBeanEJB</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2018, 2024 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -27,7 +27,7 @@
<ts.ejbjar descriptor="appclient_dep_ejblink_casesens_ejb.xml"
archivename="appclient_dep_ejblink_casesens">
<fileset dir="${ts.home}/classes"
includes="${ts.wrappers.classes.stateless.ejb},
includes="${ts.wrappers.classes.stateless.ejb.3x},
com/sun/ts/tests/assembly/util/shared/ejbref/common/ReferencedBeanCode.class"/>
</ts.ejbjar>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -88,8 +88,6 @@ public void setup(String[] args, Properties props) throws Exception {
* ones specified in the DD.
*/
public void testScope() throws Exception {
ReferencedBeanHome home1 = null;
ReferencedBean2Home home2 = null;
ReferencedBean bean1 = null;
ReferencedBean2 bean2 = null;
String bean1Name;
Expand All @@ -98,21 +96,19 @@ public void testScope() throws Exception {

try {
TestUtil.logTrace("[Client] Looking up '" + bean1Lookup + "'...");
home1 = (ReferencedBeanHome) nctx.lookup(bean1Lookup,
ReferencedBeanHome.class);
bean1 = home1.create();
bean1 = (ReferencedBean) nctx.lookup(bean1Lookup,
ReferencedBean.class);
bean1.createNamingContext();
bean1.initLogging(props);
bean1Name = bean1.whoAreYou();
TestUtil.logTrace(bean1Lookup + " name is '" + bean1Name + "'");
bean1.remove();

home2 = (ReferencedBean2Home) nctx.lookup(bean2Lookup,
ReferencedBean2Home.class);
bean2 = home2.create();
bean2 = (ReferencedBean2) nctx.lookup(bean2Lookup,
ReferencedBean2.class);
bean2.createNamingContext();
bean2.initLogging(props);
bean2Name = bean2.whoAreYou();
TestUtil.logTrace(bean2Lookup + " name is '" + bean2Name + "'");
bean2.remove();

pass = bean1Name.equals(bean1RefName) && bean2Name.equals(bean2RefName);
if (!pass) {
Expand All @@ -122,10 +118,10 @@ public void testScope() throws Exception {
TestUtil.logErr("[Client] " + bean2Lookup + "name is '" + bean2Name
+ "' expected '" + bean2RefName + "'");

throw new Exception("ejb-ref scope test failed!");
throw new Exception("ejb-link path test failed!");
}
} catch (Exception e) {
throw new Exception("ejb-ref scope test failed: " + e, e);
throw new Exception("ejb-link path test failed: " + e, e);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -20,13 +20,12 @@

package com.sun.ts.tests.appclient.deploy.ejblink.path;

import java.rmi.RemoteException;
import java.util.Properties;

import jakarta.ejb.EJBObject;
public interface ReferencedBean {
public void initLogging(Properties p);

public interface ReferencedBean extends EJBObject {
public void initLogging(Properties p) throws RemoteException;
public void createNamingContext();

public String whoAreYou() throws RemoteException;
public String whoAreYou();
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -20,13 +20,12 @@

package com.sun.ts.tests.appclient.deploy.ejblink.path;

import java.rmi.RemoteException;
import java.util.Properties;

import jakarta.ejb.EJBObject;
public interface ReferencedBean2 {
public void initLogging(Properties p);

public interface ReferencedBean2 extends EJBObject {
public void initLogging(Properties p) throws RemoteException;
public void createNamingContext();

public String whoAreYou() throws RemoteException;
public String whoAreYou();
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -20,13 +20,11 @@
package com.sun.ts.tests.appclient.deploy.ejblink.path;

import com.sun.ts.tests.assembly.util.shared.ejbref.common.ReferencedBeanCode;
import com.sun.ts.tests.common.ejb.wrappers.StatelessWrapper;
import com.sun.ts.tests.common.ejb.wrappers.Stateless3xWrapper;

import jakarta.ejb.EJBException;
public class ReferencedBean2EJB extends Stateless3xWrapper {

public class ReferencedBean2EJB extends StatelessWrapper {

public String whoAreYou() throws EJBException {
public String whoAreYou() {
return ReferencedBeanCode.whoAreYou(nctx);
}

Expand Down
Loading

0 comments on commit 8e7abd6

Please sign in to comment.