Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct jpa sunappclientxml #1582

Merged
merged 21 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
784942e
Revert "More jpa appclient fixes (#1578)" to prepare for separate
scottmarlow Oct 12, 2024
d7a856a
Add some of the reverted changes back in for jpa appclient support
scottmarlow Oct 12, 2024
ffca049
correct sun-application-client.xml in jpa Stateless3Test tests
scottmarlow Oct 12, 2024
aeda086
correct sun-application-client.xml in jpa Stateful3Test tests
scottmarlow Oct 12, 2024
bd2ad45
correct sun-application-client.xml in jpa Appmanaged tests
scottmarlow Oct 12, 2024
03773f6
Correct JPA URL ejbResURL1 = Client.class.getResource(/vehicle/statel…
scottmarlow Oct 14, 2024
7f979ce
Correct JPA URL URL ejbResURL1 = Client.class.getResource(/vehicle/st…
scottmarlow Oct 14, 2024
3ea3208
Correct JPA //vehicle/appmanaged/appmanaged_vehicle_ejb.xml to instea…
scottmarlow Oct 14, 2024
70f2378
Correct JPA //vehicle/appmanagedNoTx/appmanagedNoTx_vehicle_ejb.xml t…
scottmarlow Oct 14, 2024
854dd44
Correct JPA //vehicle/stateless3/stateless3_vehicle_ejb.jar.sun-ejb-j…
scottmarlow Oct 14, 2024
d1acc40
Correct JPA //vehicle/stateful3/stateful3_vehicle_ejb.jar.sun-ejb-jar…
scottmarlow Oct 14, 2024
762cbbf
Correct JPA //vehicle/appmanaged/appmanaged_vehicle_ejb.jar.sun-ejb-j…
scottmarlow Oct 14, 2024
7756526
Correct JPA //vehicle/appmanagedNoTx/appmanagedNoTx_vehicle_ejb.jar.s…
scottmarlow Oct 14, 2024
eae0df1
remove display-name from jpa appclient descriptor for vehicle
scottmarlow Oct 14, 2024
70542ff
remove uneeded ejb-jar.xml reference
scottmarlow Oct 14, 2024
1fd8b28
remove incorrect ejb-jar.xml reference
scottmarlow Oct 14, 2024
26a6b59
remove incorrect ejb-jar.xml reference
scottmarlow Oct 14, 2024
f86ef7e
remove incorrect ejb-jar.xml reference
scottmarlow Oct 14, 2024
981baaf
try setting allowConnectingToRunningServer to true to see if that sta…
scottmarlow Oct 15, 2024
410503c
Revert change as TCK Challenge issue was rejected for "ee.jakarta.tck…
scottmarlow Nov 5, 2024
f3091a0
None of these changes help GlassFish to run the appclient tests
scottmarlow Nov 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ public class TsTestPropsBuilder {
// Property names passed from the ts.jte file to the tstest.jte file
// Parsed from the test @class.setup_props: values + additional seen to be used by harness
static String[] tsJtePropNames = {
"s1as",
"s1as.modules",
"Driver",
"authpassword",
"authuser",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@

import java.util.Properties;

import javax.naming.InitialContext;
import javax.naming.NameClassPair;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;

import com.sun.ts.lib.harness.Status;
import com.sun.ts.lib.util.TSNamingContext;
import com.sun.ts.lib.util.TestUtil;
Expand All @@ -33,9 +38,15 @@ public class AppManagedVehicleRunner implements VehicleRunnable {
public Status run(String[] args, Properties props) {
Status sTestStatus = null;
try {
TSNamingContext jc = new TSNamingContext();
AppManagedVehicleIF bean = (AppManagedVehicleIF) jc
.lookup(APPMANAGED_REF_NAME);
AppManagedVehicleIF bean=null;
TSNamingContext jc = new TSNamingContext(props);
try {
bean = (AppManagedVehicleIF) jc
.lookup(APPMANAGED_REF_NAME);
} catch (Exception e) {
e.printStackTrace();
dumpJndi("", new InitialContext());
}
TestUtil.logTrace(
"application-managed JTA runner looked up vehicle: " + bean);
sTestStatus = (bean.runTest(args, props)).toStatus();
Expand All @@ -46,4 +57,24 @@ public Status run(String[] args, Properties props) {
}
return sTestStatus;
}

private void dumpJndi(String s,InitialContext jc ) {
try {
dumpTreeEntry(jc, jc.list(s), s);
} catch (Exception ignore) {
}
}
private void dumpTreeEntry(InitialContext jc, NamingEnumeration<NameClassPair> list, String s) throws NamingException {
System.out.println("\n1. AppManagedVehicleRunner jndi dump walking down tree branch name = " + s);
while (list.hasMore()) {
NameClassPair ncp = list.next();
System.out.println("2. AppManagedVehicleRunner jndi dump (show name + classname pair): " + ncp.toString());
if (s.length() == 0) {
dumpJndi(ncp.getName(), jc);
} else {
dumpJndi(s + "/" + ncp.getName(), jc);
}
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ public class AppManagedNoTxVehicleRunner implements VehicleRunnable {
public Status run(String[] args, Properties props) {
Status sTestStatus = null;
try {
TSNamingContext jc = new TSNamingContext();
AppManagedNoTxVehicleIF bean = (AppManagedNoTxVehicleIF) jc
.lookup(APPMANAGEDNOTX_REF_NAME);
TestUtil.logTrace(
"application-managed resource-local runner looked up vehicle: "
+ bean);
TSNamingContext jc = new TSNamingContext();
AppManagedNoTxVehicleIF bean = (AppManagedNoTxVehicleIF) jc
.lookup(APPMANAGEDNOTX_REF_NAME);
TestUtil.logTrace(
"application-managed resource-local runner looked up vehicle: "
+ bean);
sTestStatus = (bean.runTest(args, props)).toStatus();
} catch (Exception e) {
TestUtil.logErr("Test failed.", e);
Expand Down
4 changes: 2 additions & 2 deletions glassfish-runner/jpa-platform-tck/jakartaeetck/bin/ts.jte
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ javaee.level=full
# @orb.port The port number the vendor implementation is listening
# to for service requests.
########################################################################
javaee.home=/Users/alwjosep/Documents/jakartaee-tck/glassfish-runner/jpa-platform-tck/target/glassfish8
javaee.home=/home/smarlow/tck/platformtck/glassfish-runner/jpa-platform-tck/target/glassfish8
orb.host=localhost
orb.port=4848

Expand Down Expand Up @@ -1429,7 +1429,7 @@ optional.tech.packages.to.ignore=jakarta.xml.bind
########################################################################
harness.temp.directory=${ts.home}/tmp
harness.log.port=2000
harness.log.traceflag=false
harness.log.traceflag=true
harness.executeMode=0
harness.socket.retry.count=10
harness.log.delayseconds=1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<container qualifier="tck-appclient" default="true">
<configuration>
<property name="glassFishHome">target/glassfish8</property>
<property name="allowConnectingToRunningServer">true</property>
</configuration>
<protocol type="appclient" default="true">
<property name="runClient">true</property>
Expand Down Expand Up @@ -65,4 +66,4 @@
</container>
</group>

</arquillian>
</arquillian>
2 changes: 1 addition & 1 deletion glassfish-runner/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<module>jsonb-tck</module>
<module>jsonp-tck</module>
<module>pages-tck</module>
<module>persistence-tck</module>
<module>jpa-platform-tck</module>
<module>servlet-tck</module>
</modules>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ public class Spouse implements java.io.Serializable {
// Instance variables
private String id;

private String firstName;
private String first;

private String maidenName;
private String maiden;

private String lastName;
private String last;

private String socialSecurityNumber;
private String sNumber;

private Info info;

Expand All @@ -52,19 +52,19 @@ public Spouse() {

public Spouse(String v1, String v2, String v3, String v4, String v5, Info v6) {
id = v1;
firstName = v2;
maidenName = v3;
lastName = v4;
socialSecurityNumber = v5;
first = v2;
maiden = v3;
last = v4;
sNumber = v5;
info = v6;
}

public Spouse(String v1, String v2, String v3, String v4, String v5, Info v6, Customer v7) {
id = v1;
firstName = v2;
maidenName = v3;
lastName = v4;
socialSecurityNumber = v5;
first = v2;
maiden = v3;
last = v4;
sNumber = v5;
info = v6;
customer = v7;
}
Expand All @@ -83,38 +83,38 @@ public void setId(String v) {

@Column(name = "FIRSTNAME")
public String getFirstName() {
return firstName;
return first;
}

public void setFirstName(String v) {
firstName = v;
first = v;
}

@Column(name = "MAIDENNAME")
public String getMaidenName() {
return maidenName;
return maiden;
}

public void setMaidenName(String v) {
maidenName = v;
maiden = v;
}

@Column(name = "LASTNAME")
public String getLastName() {
return lastName;
return last;
}

public void setLastName(String v) {
lastName = v;
last = v;
}

@Column(name = "SOCSECNUM")
public String getSocialSecurityNumber() {
return socialSecurityNumber;
return sNumber;
}

public void setSocialSecurityNumber(String v) {
socialSecurityNumber = v;
sNumber = v;
}

// 1X1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
// 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/common/vehicle/appmanaged/appmanaged_vehicle_client.jar.sun-application-client.xml");
if(resURL != null) {
jpa_core_EntityGraph_appmanaged_vehicle_client.addAsManifestResource(resURL, "application-client.xml");
jpa_core_EntityGraph_appmanaged_vehicle_client.addAsManifestResource(resURL, "sun-application-client.xml");
}
jpa_core_EntityGraph_appmanaged_vehicle_client.addAsManifestResource(new StringAsset("Main-Class: " + Client.class.getName() + "\n"), "MANIFEST.MF");
// Call the archive processor
Expand Down Expand Up @@ -129,12 +129,12 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
com.sun.ts.tests.common.vehicle.ejb3share.NoopTransactionWrapper.class
);
// The ejb-jar.xml descriptor
URL ejbResURL1 = Client.class.getResource("/vehicle/appmanaged/appmanaged_vehicle_ejb.xml");
URL ejbResURL1 = Client.class.getResource("/com/sun/ts/tests/common/vehicle/appmanaged/appmanaged_vehicle_client.xml");
if(ejbResURL1 != null) {
jpa_core_EntityGraph_appmanaged_vehicle_ejb.addAsManifestResource(ejbResURL1, "ejb-jar.xml");
// jpa_core_EntityGraph_appmanaged_vehicle_ejb.addAsManifestResource(ejbResURL1, "ejb-jar.xml");
}
// The sun-ejb-jar.xml file
ejbResURL1 = Client.class.getResource("/vehicle/appmanaged/appmanaged_vehicle_ejb.jar.sun-ejb-jar.xml");
ejbResURL1 = Client.class.getResource("/com/sun/ts/tests/common/vehicle/appmanaged/appmanaged_vehicle_ejb.jar.sun-ejb-jar.xml");
if(ejbResURL1 != null) {
jpa_core_EntityGraph_appmanaged_vehicle_ejb.addAsManifestResource(ejbResURL1, "sun-ejb-jar.xml");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,14 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
// The application-client.xml descriptor
URL resURL = Client.class.getResource("/com/sun/ts/tests/common/vehicle/appmanagedNoTx/appmanagedNoTx_vehicle_client.xml");
if(resURL != null) {
System.out.println("xxx adding ./jpa/spec-tests/src/main/resources/com/sun/ts/tests/common/vehicle/appmanagedNoTx/appmanagedNoTx_vehicle_client.xml client container xml");
jpa_core_EntityGraph_appmanagedNoTx_vehicle_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/common/vehicle/appmanagedNoTx/appmanagedNoTx_vehicle_client.jar.sun-application-client.xml");
resURL = Client.class.getResource("/com/sun/ts/tests/common/sunxml/sun-application-client.xml");
if(resURL != null) {
jpa_core_EntityGraph_appmanagedNoTx_vehicle_client.addAsManifestResource(resURL, "application-client.xml");
System.out.println("xxx /com/sun/ts/tests/common/sunxml/sun-application-client.xml added as sun-application-client.xml" );
jpa_core_EntityGraph_appmanagedNoTx_vehicle_client.addAsManifestResource(resURL, "sun-application-client.xml");
}
jpa_core_EntityGraph_appmanagedNoTx_vehicle_client.addAsManifestResource(new StringAsset("Main-Class: " + Client.class.getName() + "\n"), "MANIFEST.MF");
// Call the archive processor
Expand Down Expand Up @@ -142,12 +144,13 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
com.sun.ts.tests.common.vehicle.appmanagedNoTx.AppManagedNoTxVehicleBean.class
);
// The ejb-jar.xml descriptor
URL ejbResURL1 = Client.class.getResource("/vehicle/appmanagedNoTx/appmanagedNoTx_vehicle_ejb.xml");
if(ejbResURL1 != null) {
jpa_core_EntityGraph_appmanagedNoTx_vehicle_ejb.addAsManifestResource(ejbResURL1, "ejb-jar.xml");
}
// The sun-ejb-jar.xml file
ejbResURL1 = Client.class.getResource("/vehicle/appmanagedNoTx/appmanagedNoTx_vehicle_ejb.jar.sun-ejb-jar.xml");
// URL ejbResURL1 = Client.class.getResource("/com/sun/ts/tests/common/vehicle/appmanagedNoTx/appmanagedNoTx_vehicle_client.xml");
// ^ is a application-client_10.xsd
// if(ejbResURL1 != null) {
// jpa_core_EntityGraph_appmanagedNoTx_vehicle_ejb.addAsManifestResource(ejbResURL1, "ejb-jar.xml");
//}
// The sun-ejb-jar.xml file http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_0-0.dtd
URL ejbResURL1 = Client.class.getResource("/com/sun/ts/tests/common/vehicle/appmanagedNoTx/appmanagedNoTx_vehicle_ejb.jar.sun-ejb-jar.xml");
if(ejbResURL1 != null) {
jpa_core_EntityGraph_appmanagedNoTx_vehicle_ejb.addAsManifestResource(ejbResURL1, "sun-ejb-jar.xml");
}
Expand Down Expand Up @@ -306,5 +309,4 @@ public void annotationsTest() throws java.lang.Exception {
super.annotationsTest();
}


}
}
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
// 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/common/vehicle/stateful3/stateful3_vehicle_client.jar.sun-application-client.xml");
if(resURL != null) {
jpa_core_EntityGraph_stateful3_vehicle_client.addAsManifestResource(resURL, "application-client.xml");
jpa_core_EntityGraph_stateful3_vehicle_client.addAsManifestResource(resURL, "sun-application-client.xml");
}
jpa_core_EntityGraph_stateful3_vehicle_client.addAsManifestResource(new StringAsset("Main-Class: " + Client.class.getName() + "\n"), "MANIFEST.MF");
// Call the archive processor
Expand Down Expand Up @@ -143,12 +143,12 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
com.sun.ts.tests.common.vehicle.ejb3share.NoopTransactionWrapper.class
);
// The ejb-jar.xml descriptor
URL ejbResURL1 = Client.class.getResource("/vehicle/stateful3/stateful3_vehicle_ejb.xml");
URL ejbResURL1 = Client.class.getResource("/com/sun/ts/tests/common/vehicle/stateful3/stateful3_vehicle_client.xml");
if(ejbResURL1 != null) {
jpa_core_EntityGraph_stateful3_vehicle_ejb.addAsManifestResource(ejbResURL1, "ejb-jar.xml");
// jpa_core_EntityGraph_stateful3_vehicle_ejb.addAsManifestResource(ejbResURL1, "ejb-jar.xml");
}
// The sun-ejb-jar.xml file
ejbResURL1 = Client.class.getResource("/vehicle/stateful3/stateful3_vehicle_ejb.jar.sun-ejb-jar.xml");
ejbResURL1 = Client.class.getResource("/com/sun/ts/tests/common/vehicle/stateful3/stateful3_vehicle_ejb.jar.sun-ejb-jar.xml");
if(ejbResURL1 != null) {
jpa_core_EntityGraph_stateful3_vehicle_ejb.addAsManifestResource(ejbResURL1, "sun-ejb-jar.xml");
}
Expand Down Expand Up @@ -307,5 +307,4 @@ public void annotationsTest() throws java.lang.Exception {
super.annotationsTest();
}


}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
// 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/common/vehicle/stateless3/stateless3_vehicle_client.jar.sun-application-client.xml");
if(resURL != null) {
jpa_core_EntityGraph_stateless3_vehicle_client.addAsManifestResource(resURL, "application-client.xml");
jpa_core_EntityGraph_stateless3_vehicle_client.addAsManifestResource(resURL, "sun-application-client.xml");
}
jpa_core_EntityGraph_stateless3_vehicle_client.addAsManifestResource(new StringAsset("Main-Class: " + Client.class.getName() + "\n"), "MANIFEST.MF");
// Call the archive processor
Expand Down Expand Up @@ -134,12 +134,12 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
com.sun.ts.tests.common.vehicle.ejb3share.NoopTransactionWrapper.class
);
// The ejb-jar.xml descriptor
URL ejbResURL1 = Client.class.getResource("/vehicle/stateless3/stateless3_vehicle_ejb.xml");
URL ejbResURL1 = Client.class.getResource("/com/sun/ts/tests/common/vehicle/stateless3/stateless3_vehicle_client.xml");
if(ejbResURL1 != null) {
jpa_core_EntityGraph_stateless3_vehicle_ejb.addAsManifestResource(ejbResURL1, "ejb-jar.xml");
// jpa_core_EntityGraph_stateless3_vehicle_ejb.addAsManifestResource(ejbResURL1, "ejb-jar.xml");
}
// The sun-ejb-jar.xml file
ejbResURL1 = Client.class.getResource("/vehicle/stateless3/stateless3_vehicle_ejb.jar.sun-ejb-jar.xml");
ejbResURL1 = Client.class.getResource("/com/sun/ts/tests/common/vehicle/stateless3/stateless3_vehicle_ejb.jar.sun-ejb-jar.xml");
if(ejbResURL1 != null) {
jpa_core_EntityGraph_stateless3_vehicle_ejb.addAsManifestResource(ejbResURL1, "sun-ejb-jar.xml");
}
Expand Down Expand Up @@ -298,5 +298,4 @@ public void annotationsTest() throws java.lang.Exception {
super.annotationsTest();
}


}
}
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
// The sun-application-client.xml file need to be added or should this be in in the vendor Arquillian extension?
resURL = Client1.class.getResource("//com/sun/ts/tests/common/vehicle/appmanaged/appmanaged_vehicle_client.jar.sun-application-client.xml");
if(resURL != null) {
jpa_core_StoredProcedureQuery_appmanaged_vehicle_client.addAsManifestResource(resURL, "application-client.xml");
jpa_core_StoredProcedureQuery_appmanaged_vehicle_client.addAsManifestResource(resURL, "sun-application-client.xml");
}
jpa_core_StoredProcedureQuery_appmanaged_vehicle_client.addAsManifestResource(new StringAsset("Main-Class: " + Client1.class.getName() + "\n"), "MANIFEST.MF");
// Call the archive processor
Expand Down Expand Up @@ -140,12 +140,12 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
Client1AppmanagedTest.class
);
// The ejb-jar.xml descriptor
URL ejbResURL1 = Client1.class.getResource("//vehicle/appmanaged/appmanaged_vehicle_ejb.xml");
URL ejbResURL1 = Client1.class.getResource("//com/sun/ts/tests/common/vehicle/appmanaged/appmanaged_vehicle_client.xml");
if(ejbResURL1 != null) {
jpa_core_StoredProcedureQuery_appmanaged_vehicle_ejb.addAsManifestResource(ejbResURL1, "ejb-jar.xml");
// jpa_core_StoredProcedureQuery_appmanaged_vehicle_ejb.addAsManifestResource(ejbResURL1, "ejb-jar.xml");
}
// The sun-ejb-jar.xml file
ejbResURL1 = Client1.class.getResource("//vehicle/appmanaged/appmanaged_vehicle_ejb.jar.sun-ejb-jar.xml");
ejbResURL1 = Client1.class.getResource("//com/sun/ts/tests/common/vehicle/appmanaged/appmanaged_vehicle_ejb.jar.sun-ejb-jar.xml");
if(ejbResURL1 != null) {
jpa_core_StoredProcedureQuery_appmanaged_vehicle_ejb.addAsManifestResource(ejbResURL1, "sun-ejb-jar.xml");
}
Expand Down Expand Up @@ -464,5 +464,4 @@ public void xmlOverridesSqlResultSetMappingAnnotationTest() throws java.lang.Exc
super.xmlOverridesSqlResultSetMappingAnnotationTest();
}


}
}
Loading