From 73ddfad36b4d91779356d85a5c12682e7bccd1d3 Mon Sep 17 00:00:00 2001 From: Alwin Joseph Date: Sat, 5 Oct 2024 00:00:47 +0530 Subject: [PATCH] 29 jta appclient tests running --- .../bin/certificates/clientcert.jks | Bin 0 -> 2257 bytes .../bin/certificates/clientcert.p12 | Bin 0 -> 1615 bytes .../jakartaeetck/bin/certificates/cts_cert | Bin 0 -> 909 bytes glassfish-runner/jta-platform-tck/pom.xml | 125 +++++++++++++++++- .../tck/GlassfishLoadableExtension.java | 2 +- .../tck/GlassfishTestArchiveProcessor.java | 8 +- ...boss.arquillian.core.spi.LoadableExtension | 2 +- .../test/resources/appclient-arquillian.xml | 44 +++++- .../ee/txpropagationtest/ClientEjbTest.java | 108 +++++---------- .../begin/UserBeginClientEjbTest.java | 67 ++-------- .../commit/UserCommitClientEjbTest.java | 60 ++------- .../getstatus/UserGetStatusClientEjbTest.java | 76 +++-------- .../rollback/UserRollbackClientEjbTest.java | 67 ++-------- .../UserSetRollbackOnlyClientEjbTest.java | 73 ++-------- ...serSetTransactionTimeoutClientEjbTest.java | 72 ++-------- .../txpropagationtest/ejb_vehicle_client.xml | 28 ++++ .../begin/ejb_vehicle_client.xml | 28 ++++ .../commit/ejb_vehicle_client.xml | 28 ++++ .../getstatus/ejb_vehicle_client.xml | 28 ++++ .../rollback/ejb_vehicle_client.xml | 28 ++++ .../setrollbackonly/ejb_vehicle_client.xml | 28 ++++ .../ejb_vehicle_client.xml | 28 ++++ 22 files changed, 472 insertions(+), 428 deletions(-) create mode 100644 glassfish-runner/jta-platform-tck/jakartaeetck/bin/certificates/clientcert.jks create mode 100644 glassfish-runner/jta-platform-tck/jakartaeetck/bin/certificates/clientcert.p12 create mode 100644 glassfish-runner/jta-platform-tck/jakartaeetck/bin/certificates/cts_cert rename glassfish-runner/jta-platform-tck/src/main/java/org/glassfish/transactions/{core => }/tck/GlassfishLoadableExtension.java (96%) rename glassfish-runner/jta-platform-tck/src/main/java/org/glassfish/transactions/{core => }/tck/GlassfishTestArchiveProcessor.java (96%) create mode 100644 jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/ejb_vehicle_client.xml create mode 100644 jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/ejb_vehicle_client.xml create mode 100644 jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/ejb_vehicle_client.xml create mode 100644 jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/ejb_vehicle_client.xml create mode 100644 jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/ejb_vehicle_client.xml create mode 100644 jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/ejb_vehicle_client.xml create mode 100644 jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/ejb_vehicle_client.xml diff --git a/glassfish-runner/jta-platform-tck/jakartaeetck/bin/certificates/clientcert.jks b/glassfish-runner/jta-platform-tck/jakartaeetck/bin/certificates/clientcert.jks new file mode 100644 index 0000000000000000000000000000000000000000..09f5569c47a3e472d830625a54508a94d5f98054 GIT binary patch literal 2257 zcmc&#XH%027tNCbl2DY;K}w{F?FmJtC;?PL5JHs@6hxLL5Lzf|YE(mO15ac6dB|H1p=%-nPDmpkX)IcI-=M$ zK6zXTfgm7Y2z(dhW<#E01K@xH^cVmjAn*|QG(D4)8fZRb!S$JcFw^uoGNaQ}r#xbT*+A-m%u z2VdIk)9j%evc|LL9EVd1;;@J0zkXv-N3j?z!TDBi)JoJ$+${`BB5t3SMh=a}xS= zZ#?tI!KL#V(x-Nn9+zBuK;GszKVf7?{J~#wscX(Rp469MP9G5d427(jRGn6X5bZn0 zW*BwKfld>J<8|C|8Vieq>y3JZx|PY8xM(L@f^>Tju)REK2Md<&{!{bZg=Smf&d^nm zg-i|2$f+N!ik3C=Jh{5j;TCo9EK4b~`*NF{*ps^zVGPj?KwAW%Kkq6vlSSECvM4u3 z7MnHZ%xV@_=Z@FElNcOk#SDC~#EPz0x)dF_s9mL98MvkHuOar^tv1&|{Alt0wDk5I zeeEfqm`+|yV>9szMzf?0t>|E_E)K4vv4WPO0@+Lx5uwdT*x(3J6}`$+mr(b_ELLzoi%77GAP|beC#VQpaAAO!H3( zHjCiqg06WKyryYNNCy@2eznRE^{EKHEZ(WHzD;gleDx+ZAbv9P?#PBALyo;5im@}8 zsqeyWKSDdYLMwF)C`wF@_)@A+$iR=GABkDjl+%UQT_}9_pg2xo0;3z-QYl8XX$|jD zOkk!6Q6AK)7a47K3g;7K>?N!jvAx(1j$AWRB4Ub(Z`&72>v}6!C#;5xb2YdzBI#l= z7=6ZnZ6tP^fa^=TZ>6N-9Dmu^UDyeFIzu0(D}tMP_IzaiZtzTQ(m`7d~#Zh%;N)HN% zx&AS{RC%PYH6gW#)X}I^aGobWO0Vl{%=C3G3)?5Y0o8`reJ$=Lv}Vd`ow#6MC-QyB zt1-7$O3-)i{mzwWX$-}R!wmnzSgqxg-c0=%%w`x-anI(Q>B&+=^V>$pzf29>Ov*Cz zq@Kq69E1%fFJ74-?V4%Vsj1!b#UaAT&bjc}qPA@=YV!Q?os}|-&)pfz-Q*Phet#L4 zK~K{koVwZ*--fCSvb3unA;jg;)AsT>Wmy}JG!&|DMn2M!v->=BrBQnwq|Gdap?@Y) zm}^ZPE+=J-lPYSG^8GPrX3uES!AEM}GxpBD7R$9Z0pdTVh#;L+0aYOoSQHondjf_) zJu_fX01AaWjkT+STx=W);rQ@PE&xCs8m12x1#+;#%;9WksJZFC!$v8P{S+%9*Hzi> zja(5{O3}>2z9j`F5jDF5ki9k(bL8{RAK|kNLeTq&w^oABiKdBW8lvr&6StD zO{AG<>iwEW4I8Le9WFtgi%YfL8y4RkJj^pWbyuFo;57kd^TN_oh1)YQ;S>_^|} zW-v?BT1o`2=XLa!5Qn$J&FME>Zd-+YYnK>CaGssRlo`qcUg{dRyxJIPdkFev={xeS zwt~smh)LUv39p=WTAx!mWGmfn^ypAaj2nbqOLFpht2f{L?k&KJyA@FlpUpyLwJuA% zY$~GwAYUsvAR57h!T<o28$9T&s$Kc6c(0=2lk```kI=tCX~m4_^>QF zf_5Lt-Glq>2sdiIG8GJ3mRWg|kRpU8ecBC&O~AG3yZRH@(^^A86%m`6+MZh#jKamz zc?b1zxf4wjJsK0mB`*4VQ!!=0UNj*}=4wuM*XV`4Cbzoxxi2=$8I-t(oWX>NrACjV aN2^xEnzd)x&M^H7bqrttb?%;#-pt>D`u9=* literal 0 HcmV?d00001 diff --git a/glassfish-runner/jta-platform-tck/jakartaeetck/bin/certificates/clientcert.p12 b/glassfish-runner/jta-platform-tck/jakartaeetck/bin/certificates/clientcert.p12 new file mode 100644 index 0000000000000000000000000000000000000000..409e41e673587e2381ded8fdfe7958c5b2c616ae GIT binary patch literal 1615 zcmV-V2C(@sf(A2kx;s>GcIZ0;*S|y~<-^X=pwb0lP;Qtti>gC};O4;iJ9ZYc8h`9X{A8TqL=AoL- z?9N+iX5$_Ayw`nsB^=zGN~DUW?Y72c(I)0rKZXRbF=P*Cx`nsB+Ej+?;HAX~exhIzg4w3hxwIjNG=iz= z%|X^`1R-ZKc{)KA5(6h)EzyaC!>-v*Obr7E*ZiCY`W!^5>W_G}%y`3F&mi<3Kj_Sa zUo$ydR%%HTn(oiVGq$t^%qvdGaIt%hYuRSys>w(S)ROYxk(Xg9$6gZW)~ybmpZVwK zIC>#fGDg)SkNI|7JxBhjm1S~1%->>3wv~%;l+byf8+;u9^;=qPGmoZwK?K%N7%IOQu|x=w_mfDX zIAg9im~Fp4hJ1d(lzQvbKxw|H?D_b2zx7IIY|pVHQcX}T>kTL;Gl1)j?}%2M+KijB zsX!tkQ0*vLy;64d)9`aO0bFUf$u}~VF!8q-V%ew%6MruW!LyDURZ%5rC}8(o!`eEo z7STB=JT1jN%o$k>r>eNhd-*-U4>wG7(NASH3e3c8rRr{aG#YMaM02R0Lt`ntgDNI{ zUw9y61g=PJy%A0ff!aeKsTh{AHE?j6GWUK0sHz;NBhWdXf5;IGXXXZ3P%2Ta zkYX!*Ll1F|tCgf$dok}u0tLw;K`WtTQ_%%qF3bu47%S`8f~8d$`JY#t3~KXlxR_1j z+32VdcefI^NqT2MB@uKmE4Ef6S5qNamP1a-f0SEPu-m|=Z&+ibF`t4pwd<|*zWn5GLG9aJ&?-5X zT#zi%+lLZOd$15qm`hlNbR`&rAHMgAK3AX4XWoJ1a?aRN#A1G-vKpK<^l%|zhH3|> zQgTPbey`&?W_PRMB<|zJ5ufeIr}0zU`KNr|le2fU%NYM|=mtRG?4W!39VtgYzba zud!tvbKSLz*Bzj1!tCXSX*Ev)!T;>dRkw@k>%>Scm-qcBFJ|(_ai)hEhhd`MeVo{C z-xV3MiU+>K*Gmm_}qPsRWyWEShCj91hvc=-qe3YFh1nB4iWwHj>i}cP;>~ zs^F^^7xC%s7hz=c8=dY2X3mEB5wqx;U7jbLZVHrjxoIv%n#&Cr! zYC)_TU_W=dcbi}`>4^bbQ!RME;ne7Jb~8OPJ2>8gg$O;`9&gyhfr|iqhY#iqAVAOS zf@M_Vx#a9aaLPi=#O^+p*z!%V!?Q4y24f$rLyf67!TVu5)+TyzR_1t&=g&2o?Qp%l zieE1}5bi=OY|CJJor_7&`|d#AN85K^Mn-N{27^*VZUas>=1>+kVW!Yv z7>7fc$=A_P*gy~@!!FF_R9cjinU`LYpJym%AOjNQ5*7_E%~SBrOfJeVt}HG|%`H~& z%uCiY6f+P3$#VGI@9Ax=}hpS#$lqwX0zyJi1rrqGdySA8XQd)p6v0 z*ahd3O@W6bb2hD5b8*-ArPak^LJqNAyI5W?;a+m$qx{SxTk;qUL{3Ci^|2mjVrFDu zT&!pyZy*bdOj$k_F&2?)ZCi3zSFGea-THIww>6b>4UVTLA_pQcl>q~hks;Rj*Yk=M zN!_z=%A4#nOjDY2B>Cp@?&sHzR9}5S}frD z_0p@)i~c8j)!V3T(Y;~5WOIYGmx5V%-VUvIAN~KQM*Ls=#VXLAi9gN1dCRP>$~rE- z3l1q9eB58R&oQX~sQPK??U-xoR+{@Au>{rk;t z)2#2SD<64q!REonP1)XmpY(5G{M+Z%tLnO9+1b11e~;wu-@S6i_pN*KCN}dlcs=-V JxIjQ)2LO6WWJmx2 literal 0 HcmV?d00001 diff --git a/glassfish-runner/jta-platform-tck/pom.xml b/glassfish-runner/jta-platform-tck/pom.xml index 741eaacaa0..23cf536ae5 100644 --- a/glassfish-runner/jta-platform-tck/pom.xml +++ b/glassfish-runner/jta-platform-tck/pom.xml @@ -56,6 +56,7 @@ 8.0.0-JDK17-M7 ${project.build.directory}/${glassfish.toplevel.dir} + ${glassfish.home}/glassfish/lib glassfish8 @@ -136,6 +137,21 @@ arquillian-container-test-spi ${arquillian.junit} + + org.jboss.arquillian.container + arquillian-container-spi + ${arquillian.junit} + + + org.jboss.arquillian.core + arquillian-core-spi + ${arquillian.junit} + + + org.jboss.arquillian.test + arquillian-test-impl-base + ${arquillian.junit} + org.glassfish.main.common simple-glassfish-api @@ -159,7 +175,7 @@ org.omnifaces.arquillian arquillian-glassfish-server-managed - 1.4 + 1.6 test @@ -231,6 +247,43 @@ tck-porting-lib ${version.jakarta.tck.arquillian} + + jakarta.tck + common + ${project.version} + + + jakarta.tck + libutil + ${project.version} + + + jakarta.tck + runtime + ${project.version} + + + jakarta.tck + dbprocedures + 3.2.0 + test + + + jakarta.persistence + jakarta.persistence-api + + + + + org.apache.derby + derbyclient + 10.15.2.0 + + + org.apache.derby + derbytools + 10.15.2.0 + @@ -304,6 +357,73 @@ + + 004-copy-lib + + copy + + generate-resources + + + + jakarta.tck + libutil + true + ${project.build.directory}/lib + libutil.jar + + + jakarta.tck + common + true + ${project.build.directory}/lib + common.jar + + + jakarta.tck.arquillian + tck-porting-lib + true + ${project.build.directory}/lib + tck-porting-lib.jar + + + jakarta.tck + runtime + true + ${project.build.directory}/lib + runtime.jar + + + jakarta.tck + ${tck.artifactId} + true + ${project.build.directory}/lib + jta-tck.jar + + + org.apache.derby + derbyclient + true + ${glassfish.lib.dir} + derbyclient.jar + + + org.apache.derby + derbytools + true + ${glassfish.lib.dir} + derbytools.jar + + + jakarta.tck.arquillian + arquillian-protocol-lib + true + ${project.build.directory}/lib + arquillian-protocol-lib.jar + + + + @@ -338,7 +458,6 @@ - @@ -384,7 +503,6 @@ tck-appclient - com/sun/ts/tests/jta/ee/transactional/*Ejb*.java com/sun/ts/tests/jta/ee/txpropagationtest/*Ejb*.java com/sun/ts/tests/jta/ee/usertransaction/**/*EjbTest*.java @@ -404,6 +522,7 @@ true true /tmp + ${project.basedir} appclient-arquillian.xml diff --git a/glassfish-runner/jta-platform-tck/src/main/java/org/glassfish/transactions/core/tck/GlassfishLoadableExtension.java b/glassfish-runner/jta-platform-tck/src/main/java/org/glassfish/transactions/tck/GlassfishLoadableExtension.java similarity index 96% rename from glassfish-runner/jta-platform-tck/src/main/java/org/glassfish/transactions/core/tck/GlassfishLoadableExtension.java rename to glassfish-runner/jta-platform-tck/src/main/java/org/glassfish/transactions/tck/GlassfishLoadableExtension.java index 21c10c8358..175f81d3b2 100644 --- a/glassfish-runner/jta-platform-tck/src/main/java/org/glassfish/transactions/core/tck/GlassfishLoadableExtension.java +++ b/glassfish-runner/jta-platform-tck/src/main/java/org/glassfish/transactions/tck/GlassfishLoadableExtension.java @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.transactions.core.tck; +package org.glassfish.transactions.tck; import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor; import org.jboss.arquillian.test.spi.enricher.resource.ResourceProvider; diff --git a/glassfish-runner/jta-platform-tck/src/main/java/org/glassfish/transactions/core/tck/GlassfishTestArchiveProcessor.java b/glassfish-runner/jta-platform-tck/src/main/java/org/glassfish/transactions/tck/GlassfishTestArchiveProcessor.java similarity index 96% rename from glassfish-runner/jta-platform-tck/src/main/java/org/glassfish/transactions/core/tck/GlassfishTestArchiveProcessor.java rename to glassfish-runner/jta-platform-tck/src/main/java/org/glassfish/transactions/tck/GlassfishTestArchiveProcessor.java index 7cad005c89..272d63ca1e 100644 --- a/glassfish-runner/jta-platform-tck/src/main/java/org/glassfish/transactions/core/tck/GlassfishTestArchiveProcessor.java +++ b/glassfish-runner/jta-platform-tck/src/main/java/org/glassfish/transactions/tck/GlassfishTestArchiveProcessor.java @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.transactions.core.tck; +package org.glassfish.transactions.tck; import org.jboss.arquillian.config.descriptor.api.ArquillianDescriptor; import org.jboss.arquillian.config.descriptor.api.ExtensionDef; @@ -78,7 +78,7 @@ public void initalize(@Observes ArquillianDescriptor descriptor) { @Override public void processClientArchive(JavaArchive clientArchive, Class testClass, URL sunXmlURL) { String name = clientArchive.getName(); - addDescriptors(name, clientArchive, testClass); + // addDescriptors(name, clientArchive, testClass); } @Override @@ -100,13 +100,13 @@ public void processParArchive(JavaArchive javaArchive, Class aClass, URL url) @Override public void processEarArchive(EnterpriseArchive earArchive, Class testClass, URL sunXmlURL) { String name = earArchive.getName(); - addDescriptors(name, earArchive, testClass); + // addDescriptors(name, earArchive, testClass); } @Override public void processEjbArchive(JavaArchive ejbArchive, Class testClass, URL sunXmlURL) { String name = ejbArchive.getName(); - addDescriptors(name, ejbArchive, testClass); + // addDescriptors(name, ejbArchive, testClass); } protected void addDescriptors(String archiveName, ManifestContainer archive, Class testClass) { diff --git a/glassfish-runner/jta-platform-tck/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension b/glassfish-runner/jta-platform-tck/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension index a3e9fc312a..431551431f 100644 --- a/glassfish-runner/jta-platform-tck/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension +++ b/glassfish-runner/jta-platform-tck/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension @@ -1 +1 @@ -org.glassfish.transactions.core.tck.GlassfishLoadableExtension \ No newline at end of file +org.glassfish.transactions.tck.GlassfishLoadableExtension \ No newline at end of file diff --git a/glassfish-runner/jta-platform-tck/src/test/resources/appclient-arquillian.xml b/glassfish-runner/jta-platform-tck/src/test/resources/appclient-arquillian.xml index 2f4d5a265f..393c4b9dd0 100644 --- a/glassfish-runner/jta-platform-tck/src/test/resources/appclient-arquillian.xml +++ b/glassfish-runner/jta-platform-tck/src/test/resources/appclient-arquillian.xml @@ -8,7 +8,7 @@ - ${ts.home}/dist/ + target/ @@ -16,17 +16,49 @@ target/glassfish8 - + true true target/appclient + true - + ${glassfish.home}/glassfish/bin/appclient \ + -Djdk.tls.client.enableSessionTicketExtension=false \ + -Djdk.tls.server.enableSessionTicketExtension=false \ + -Djava.security.policy=${glassfish.home}/glassfish/lib/appclient/client.policy \ + -Dcts.tmp=${ts.home}/tmp \ + -Djava.security.auth.login.config=${glassfish.home}/glassfish/lib/appclient/appclientlogin.conf \ + -Djava.protocol.handler.pkgs=javax.net.ssl \ + -Djavax.net.ssl.keyStore=${ts.home}/bin/certificates/clientcert.jks \ + -Djavax.net.ssl.keyStorePassword=changeit \ + -Djavax.net.ssl.trustStore=${glassfish.home}/glassfish/domains/domain1/config/cacerts.jks \ + -Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl \ + -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl \ + -Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl \ + -Dorg.xml.sax.driver=com.sun.org.apache.xerces.internal.parsers.SAXParser \ + -Dorg.xml.sax.parser=org.xml.sax.helpers.XMLReaderAdapter \ + -Doracle.jdbc.J2EE13Compliant=true \ + -Doracle.jdbc.mapDateToTimestamp \ + -Dstartup.login=false \ + -Dauth.gui=false \ + -Dlog.file.location=${glassfish.home}/glassfish/domains/domain1/logs \ + -Dri.log.file.location=${glassfish.home}/glassfish/domains/domain1/logs \ + -DwebServerHost.2=localhost \ + -DwebServerPort.2=8080 \ + -Ddeliverable.class=com.sun.ts.lib.deliverable.cts.CTSDeliverable \ + -jar \ + ${clientEarDir}/${clientAppArchive} + + \\ - CLASSPATH=${project.build.directory}/appclient/javatest.jar:${project.build.directory}/appclient/libutil.jar:${project.build.directory}/appclient/libcommon.jar + + PATH=${env.PATH};LD_LIBRARY_PATH=${glassfish.home}/lib;AS_DEBUG=true; + APPCPATH=target/lib/arquillian-protocol-lib.jar:target/lib/tck-porting-lib.jar:target/appclient/lib/arquillian-core.jar:target/appclient/lib/arquillian-junit5.jar:${glassfish.home}/glassfish/modules/security.jar:${glassfish.home}/glassfish/lib/gf-client.jar ${project.basedir} - ${ts.home}/tmp - ${ts.home}/bin/ts.jte + /tmp + jakartaeetck/bin/ts.jte + sql/derby/derby.dml.sql true 20000 diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/ClientEjbTest.java b/jta/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/ClientEjbTest.java index 7707b45dda..7a036ef933 100644 --- a/jta/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/ClientEjbTest.java +++ b/jta/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/ClientEjbTest.java @@ -30,11 +30,10 @@ @Tag("jta") @Tag("platform") @Tag("tck-appclient") - public class ClientEjbTest extends com.sun.ts.tests.jta.ee.txpropagationtest.Client { static final String VEHICLE_ARCHIVE = "jta_ejb_vehicle"; - private static String packagePath = ClientJspTest.class.getPackageName().replace(".", "/"); + private static String packagePath = ClientEjbTest.class.getPackageName().replace(".", "/"); private static final Logger logger = System.getLogger(ClientEjbTest.class.getName()); @@ -53,86 +52,56 @@ public void cleanup() { logger.log(Logger.Level.INFO, "cleanup ok"); } - /** - EE10 Deployment Descriptors: - jta_ee_txpropagate1_ejb: META-INF/ejb-jar.xml,jar.sun-ejb-jar.xml - jta_ee_txpropagate2_ejb: META-INF/ejb-jar.xml,jar.sun-ejb-jar.xml - jta_ee_txpropagate3_ejb: META-INF/ejb-jar.xml,jar.sun-ejb-jar.xml - jta_ejb_vehicle: - jta_ejb_vehicle_client: META-INF/application-client.xml,jar.sun-application-client.xml - jta_ejb_vehicle_ejb: META-INF/ejb-jar.xml,jar.sun-ejb-jar.xml - jta_jsp_vehicle: - jta_jsp_vehicle_web: WEB-INF/web.xml,war.sun-web.xml - jta_servlet_vehicle: - jta_servlet_vehicle_web: WEB-INF/web.xml,war.sun-web.xml - - Found Descriptors: - Client: - - /com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_client.xml - Ejb: - - /com/sun/ts/tests/jta/ee/txpropagationtest/ejb_vehicle_ejb.xml - /com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_ejb.xml - Ear: - - */ @TargetsContainer("tck-appclient") @OverProtocol("appclient") @Deployment(name = VEHICLE_ARCHIVE, order = 2) public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) { - // Client - // the jar with the correct archive name - JavaArchive jta_ejb_vehicle_client = ShrinkWrap.create(JavaArchive.class, "jta_ejb_vehicle_client.jar"); - // The class files + + JavaArchive jta_ejb_vehicle_client = ShrinkWrap.create(JavaArchive.class, "jta_ejb_vehicle_client.jar"); jta_ejb_vehicle_client.addClasses( com.sun.ts.tests.common.vehicle.VehicleRunnable.class, com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, - com.sun.ts.tests.common.vehicle.ejb.EJBVehicleRemote.class, - com.sun.ts.lib.harness.EETest.Fault.class, + com.sun.ts.tests.common.vehicle.VehicleClient.class, com.sun.ts.tests.common.vehicle.EmptyVehicleRunner.class, + com.sun.ts.tests.common.vehicle.ejb.EJBVehicleRemote.class, com.sun.ts.tests.common.vehicle.ejb.EJBVehicleRunner.class, + com.sun.ts.lib.harness.EETest.Fault.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.jta.ee.txpropagationtest.Client.class, + com.sun.ts.tests.jta.ee.txpropagationtest.TxBean.class, + com.sun.ts.tests.jta.ee.txpropagationtest.DBSupport.class, + ClientEjbTest.class ); - // The application-client.xml descriptor - //TODO : replace display-name as jta_ejb_vehicle_client - URL resURL = ClientEjbTest.class.getResource("/vehicle/ejb/ejb_vehicle_client.xml"); - + URL resURL = ClientEjbTest.class.getClassLoader().getResource(packagePath+"/ejb_vehicle_client.xml"); if(resURL != null) { jta_ejb_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 = ClientEjbTest.class.getResource("/vehicle/ejb/ejb_vehicle_client.jar.sun-application-client.xml"); + resURL = ClientEjbTest.class.getClassLoader().getResource(packagePath+"/jta_ejb_vehicle_client.jar.sun-application-client.xml"); if(resURL != null) { - jta_ejb_vehicle_client.addAsManifestResource(resURL, "application-client.xml"); + jta_ejb_vehicle_client.addAsManifestResource(resURL, "sun-application-client.xml"); } jta_ejb_vehicle_client.addAsManifestResource(new StringAsset("Main-Class: " + ClientEjbTest.class.getName() + "\n"), "MANIFEST.MF"); archiveProcessor.processClientArchive(jta_ejb_vehicle_client, ClientEjbTest.class, resURL); - // Ejb - // the jar with the correct archive name + JavaArchive jta_ejb_vehicle_ejb = ShrinkWrap.create(JavaArchive.class, "jta_ejb_vehicle_ejb.jar"); - // The class files jta_ejb_vehicle_ejb.addClasses( com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, - com.sun.ts.lib.harness.EETest.Fault.class, - com.sun.ts.tests.jta.ee.txpropagationtest.TxBean.class, - com.sun.ts.tests.jta.ee.txpropagationtest.TxBeanEJB.class, - com.sun.ts.tests.common.vehicle.ejb.EJBVehicle.class, com.sun.ts.tests.common.vehicle.VehicleRunnable.class, + com.sun.ts.tests.common.vehicle.VehicleClient.class, + com.sun.ts.tests.common.vehicle.ejb.EJBVehicle.class, com.sun.ts.tests.common.vehicle.ejb.EJBVehicleRemote.class, com.sun.ts.tests.jta.ee.txpropagationtest.Client.class, com.sun.ts.tests.jta.ee.txpropagationtest.DBSupport.class, com.sun.ts.tests.jta.ee.txpropagationtest.TxBean.class, + com.sun.ts.tests.jta.ee.txpropagationtest.TxBeanEJB.class, com.sun.ts.lib.harness.EETest.class, + com.sun.ts.lib.harness.EETest.Fault.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.jta.ee.txpropagationtest.DBSupport.class, ClientEjbTest.class ); // The ejb-jar.xml descriptor @@ -145,54 +114,37 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test if(ejbResURL != null) { jta_ejb_vehicle_ejb.addAsManifestResource(ejbResURL, "sun-ejb-jar.xml"); } + jta_ejb_vehicle_ejb.addAsManifestResource(new StringAsset("Main-Class: " + ClientEjbTest.class.getName() + "\n"), "MANIFEST.MF"); + archiveProcessor.processEjbArchive(jta_ejb_vehicle_ejb, ClientEjbTest.class, ejbResURL); + JavaArchive jta_ee_txpropagate1_ejb = ShrinkWrap.create(JavaArchive.class, "jta_ee_txpropagate1_ejb.jar"); - // The class files jta_ee_txpropagate1_ejb.addClasses( com.sun.ts.tests.jta.ee.txpropagationtest.TxBean.class, com.sun.ts.tests.jta.ee.txpropagationtest.TxBeanEJB.class ); // The ejb-jar.xml descriptor - ejbResURL = ClientEjbTest.class.getClassLoader().getResource(packagePath+"/jta_ee_txpropagate1_ejb.xml"); - if(ejbResURL != null) { - jta_ee_txpropagate1_ejb.addAsManifestResource(ejbResURL, "ejb-jar.xml"); + URL ejbJarResURL = ClientEjbTest.class.getClassLoader().getResource(packagePath+"/jta_ee_txpropagate1_ejb.xml"); + if(ejbJarResURL != null) { + jta_ee_txpropagate1_ejb.addAsManifestResource(ejbJarResURL, "ejb-jar.xml"); } // The sun-ejb-jar.xml file - ejbResURL = ClientEjbTest.class.getClassLoader().getResource(packagePath+"/jta_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml"); - if(ejbResURL != null) { - jta_ee_txpropagate1_ejb.addAsManifestResource(ejbResURL, "sun-ejb-jar.xml"); + ejbJarResURL = ClientEjbTest.class.getClassLoader().getResource(packagePath+"/jta_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml"); + if(ejbJarResURL != null) { + jta_ee_txpropagate1_ejb.addAsManifestResource(ejbJarResURL, "sun-ejb-jar.xml"); } - archiveProcessor.processEjbArchive(jta_ee_txpropagate1_ejb, ClientEjbTest.class, ejbResURL); + jta_ee_txpropagate1_ejb.addAsManifestResource(new StringAsset("Main-Class: " + ClientEjbTest.class.getName() + "\n"), "MANIFEST.MF"); + archiveProcessor.processEjbArchive(jta_ee_txpropagate1_ejb, ClientEjbTest.class, ejbJarResURL); - // Ear EnterpriseArchive jta_ejb_vehicle_ear = ShrinkWrap.create(EnterpriseArchive.class, "jta_ejb_vehicle.ear"); - - // Any libraries added to the ear - - // The component jars built by the package target jta_ejb_vehicle_ear.addAsModule(jta_ee_txpropagate1_ejb); - // jta_ejb_vehicle_ear.addAsModule(jta_ee_txpropagate2_ejb); - // jta_ejb_vehicle_ear.addAsModule(jta_ee_txpropagate3_ejb); jta_ejb_vehicle_ear.addAsModule(jta_ejb_vehicle_ejb); jta_ejb_vehicle_ear.addAsModule(jta_ejb_vehicle_client); + jta_ejb_vehicle_ear.addAsManifestResource(new StringAsset("Main-Class: " + ClientEjbTest.class.getName() + "\n"), "MANIFEST.MF"); - - - // // The application.xml descriptor - // URL earResURL = Client.class.getResource("/com/sun/ts/tests/jta/ee/txpropagationtest/"); - // if(earResURL != null) { - // jta_ejb_vehicle_ear.addAsManifestResource(earResURL, "application.xml"); - // } - // The sun-application.xml descriptor - URL earResURL = Client.class.getClassLoader().getResource(packagePath+"/jta_ejb_vehicle_client.jar.sun-application-client.xml"); - if(earResURL != null) { - jta_ejb_vehicle_ear.addAsManifestResource(earResURL, "sun-application.xml"); - } - archiveProcessor.processEarArchive(jta_ejb_vehicle_ear, Client.class, earResURL); - return jta_ejb_vehicle_ear; } diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/begin/UserBeginClientEjbTest.java b/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/begin/UserBeginClientEjbTest.java index bdf8a59346..d99c0941f7 100644 --- a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/begin/UserBeginClientEjbTest.java +++ b/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/begin/UserBeginClientEjbTest.java @@ -28,7 +28,6 @@ @ExtendWith(ArquillianExtension.class) @Tag("jta") @Tag("platform") -@Tag("web") @Tag("tck-appclient") public class UserBeginClientEjbTest extends com.sun.ts.tests.jta.ee.usertransaction.begin.UserBeginClient { @@ -53,35 +52,12 @@ public void cleanup() { logger.log(Logger.Level.INFO, "cleanup ok"); } - /** - EE10 Deployment Descriptors: - begin_ejb_vehicle: - begin_ejb_vehicle_client: META-INF/application-client.xml,jar.sun-application-client.xml - begin_ejb_vehicle_ejb: META-INF/ejb-jar.xml,jar.sun-ejb-jar.xml - begin_jsp_vehicle: - begin_jsp_vehicle_web: WEB-INF/web.xml,war.sun-web.xml - begin_servlet_vehicle: - begin_servlet_vehicle_web: WEB-INF/web.xml,war.sun-web.xml - Found Descriptors: - Client: - - /com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_client.xml - Ejb: - - /com/sun/ts/tests/jta/ee/usertransaction/begin/ejb_vehicle_ejb.xml - /com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_ejb.xml - Ear: - - */ @TargetsContainer("tck-appclient") @OverProtocol("appclient") @Deployment(name = VEHICLE_ARCHIVE, order = 2) public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) { - // Client - // the jar with the correct archive name JavaArchive begin_ejb_vehicle_client = ShrinkWrap.create(JavaArchive.class, "begin_ejb_vehicle_client.jar"); - // The class files begin_ejb_vehicle_client.addClasses( com.sun.ts.tests.common.vehicle.VehicleRunnable.class, com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, @@ -93,31 +69,31 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test 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.jta.ee.usertransaction.begin.UserBeginClient.class, + com.sun.ts.tests.jta.ee.common.Transact.class, + com.sun.ts.tests.jta.ee.common.TransactionStatus.class, + com.sun.ts.tests.jta.ee.common.InvalidStatusException.class, + com.sun.ts.tests.jta.ee.common.InitFailedException.class, UserBeginClientEjbTest.class ); // The application-client.xml descriptor - //TODO : replace display-name begin_ejb_vehicle_client - URL resURL = UserBeginClientEjbTest.class.getResource("/vehicle/ejb/ejb_vehicle_client.xml"); + URL resURL = UserBeginClientEjbTest.class.getClassLoader().getResource(packagePath+"/ejb_vehicle_client.xml"); if(resURL != null) { begin_ejb_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 = UserBeginClientEjbTest.class.getResource("/vehicle/ejb/ejb_vehicle_client.jar.sun-application-client.xml"); + resURL = UserBeginClientEjbTest.class.getClassLoader().getResource(packagePath+"/begin_ejb_vehicle_client.jar.sun-application-client.xml"); if(resURL != null) { - begin_ejb_vehicle_client.addAsManifestResource(resURL, "application-client.xml"); + begin_ejb_vehicle_client.addAsManifestResource(resURL, "sun-application-client.xml"); } begin_ejb_vehicle_client.addAsManifestResource(new StringAsset("Main-Class: " + UserBeginClientEjbTest.class.getName() + "\n"), "MANIFEST.MF"); archiveProcessor.processClientArchive(begin_ejb_vehicle_client, UserBeginClientEjbTest.class, resURL); - // Ejb - // the jar with the correct archive name JavaArchive begin_ejb_vehicle_ejb = ShrinkWrap.create(JavaArchive.class, "begin_ejb_vehicle_ejb.jar"); // The class files begin_ejb_vehicle_ejb.addClasses( com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, com.sun.ts.lib.harness.EETest.Fault.class, - com.sun.ts.tests.jta.ee.usertransaction.begin.UserBeginClient.class, com.sun.ts.tests.jta.ee.common.Transact.class, com.sun.ts.tests.jta.ee.common.InvalidStatusException.class, com.sun.ts.tests.common.vehicle.ejb.EJBVehicle.class, @@ -126,48 +102,29 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test com.sun.ts.tests.common.vehicle.VehicleRunnable.class, com.sun.ts.tests.common.vehicle.ejb.EJBVehicleRemote.class, com.sun.ts.tests.jta.ee.common.InvalidStatusException.class, - com.sun.ts.tests.jta.ee.common.InitFailedException.class, com.sun.ts.lib.harness.EETest.class, com.sun.ts.lib.harness.ServiceEETest.class, - com.sun.ts.tests.jta.ee.common.TransactionStatus.class, com.sun.ts.lib.harness.EETest.SetupException.class, com.sun.ts.tests.common.vehicle.VehicleClient.class, + com.sun.ts.tests.jta.ee.usertransaction.begin.UserBeginClient.class, UserBeginClientEjbTest.class ); // The ejb-jar.xml descriptor - URL ejbResURL = UserBeginClient.class.getClassLoader().getResource(packagePath+"/ejb_vehicle_ejb.xml"); + URL ejbResURL = UserBeginClientEjbTest.class.getClassLoader().getResource(packagePath+"/ejb_vehicle_ejb.xml"); if(ejbResURL != null) { begin_ejb_vehicle_ejb.addAsManifestResource(ejbResURL, "ejb-jar.xml"); } // The sun-ejb-jar.xml file - ejbResURL = UserBeginClient.class.getClassLoader().getResource(packagePath+"/begin_ejb_vehicle_ejb.jar.sun-ejb-jar.xml"); + ejbResURL = UserBeginClientEjbTest.class.getClassLoader().getResource(packagePath+"/begin_ejb_vehicle_ejb.jar.sun-ejb-jar.xml"); if(ejbResURL != null) { begin_ejb_vehicle_ejb.addAsManifestResource(ejbResURL, "sun-ejb-jar.xml"); } - archiveProcessor.processEjbArchive(begin_ejb_vehicle_ejb, UserBeginClient.class, ejbResURL); + archiveProcessor.processEjbArchive(begin_ejb_vehicle_ejb, UserBeginClientEjbTest.class, ejbResURL); - // Ear EnterpriseArchive begin_ejb_vehicle_ear = ShrinkWrap.create(EnterpriseArchive.class, "begin_ejb_vehicle.ear"); - - // Any libraries added to the ear - - // The component jars built by the package target begin_ejb_vehicle_ear.addAsModule(begin_ejb_vehicle_ejb); begin_ejb_vehicle_ear.addAsModule(begin_ejb_vehicle_client); - - // The application.xml descriptor - URL earResURL = UserBeginClient.class.getResource("/com/sun/ts/tests/jta/ee/usertransaction/begin/"); - if(earResURL != null) { - begin_ejb_vehicle_ear.addAsManifestResource(earResURL, "application.xml"); - } - // The sun-application.xml descriptor - earResURL = UserBeginClient.class.getResource("/com/sun/ts/tests/jta/ee/usertransaction/begin/begin_ejb_vehicle_client.jar.sun-application-client.xml"); - if(earResURL != null) { - begin_ejb_vehicle_ear.addAsManifestResource(earResURL, "sun-application.xml"); - } - archiveProcessor.processEarArchive(begin_ejb_vehicle_ear, UserBeginClient.class, earResURL); - return begin_ejb_vehicle_ear; } diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/commit/UserCommitClientEjbTest.java b/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/commit/UserCommitClientEjbTest.java index f19d6d4b4e..6a93957485 100644 --- a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/commit/UserCommitClientEjbTest.java +++ b/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/commit/UserCommitClientEjbTest.java @@ -28,7 +28,6 @@ @ExtendWith(ArquillianExtension.class) @Tag("jta") @Tag("platform") -@Tag("web") @Tag("tck-appclient") public class UserCommitClientEjbTest extends com.sun.ts.tests.jta.ee.usertransaction.commit.UserCommitClient { @@ -53,27 +52,6 @@ public void cleanup() { logger.log(Logger.Level.INFO, "cleanup ok"); } - /** - EE10 Deployment Descriptors: - commit_ejb_vehicle: - commit_ejb_vehicle_client: META-INF/application-client.xml,jar.sun-application-client.xml - commit_ejb_vehicle_ejb: META-INF/ejb-jar.xml,jar.sun-ejb-jar.xml - commit_jsp_vehicle: - commit_jsp_vehicle_web: WEB-INF/web.xml,war.sun-web.xml - commit_servlet_vehicle: - commit_servlet_vehicle_web: WEB-INF/web.xml,war.sun-web.xml - - Found Descriptors: - Client: - - /com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_client.xml - Ejb: - - /com/sun/ts/tests/jta/ee/usertransaction/commit/ejb_vehicle_ejb.xml - /com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_ejb.xml - Ear: - - */ @TargetsContainer("tck-appclient") @OverProtocol("appclient") @Deployment(name = VEHICLE_ARCHIVE, order = 2) @@ -93,25 +71,26 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test 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.jta.ee.common.Transact.class, + com.sun.ts.tests.jta.ee.common.TransactionStatus.class, + com.sun.ts.tests.jta.ee.common.InvalidStatusException.class, + com.sun.ts.tests.jta.ee.common.InitFailedException.class, + UserCommitClient.class, UserCommitClientEjbTest.class ); // The application-client.xml descriptor - // TODO replace display-name - URL resURL = UserCommitClientEjbTest.class.getResource("/vehicle/ejb/ejb_vehicle_client.xml"); + URL resURL = UserCommitClientEjbTest.class.getClassLoader().getResource(packagePath+"/ejb_vehicle_client.xml"); if(resURL != null) { commit_ejb_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 = UserCommitClientEjbTest.class.getResource("//com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_client.jar.sun-application-client.xml"); + resURL = UserCommitClientEjbTest.class.getClassLoader().getResource(packagePath+"/commit_ejb_vehicle_client.jar.sun-application-client.xml"); if(resURL != null) { - commit_ejb_vehicle_client.addAsManifestResource(resURL, "application-client.xml"); + commit_ejb_vehicle_client.addAsManifestResource(resURL, "sun-application-client.xml"); } commit_ejb_vehicle_client.addAsManifestResource(new StringAsset("Main-Class: " + UserCommitClientEjbTest.class.getName() + "\n"), "MANIFEST.MF"); archiveProcessor.processClientArchive(commit_ejb_vehicle_client, UserCommitClientEjbTest.class, resURL); - // Ejb - // the jar with the correct archive name JavaArchive commit_ejb_vehicle_ejb = ShrinkWrap.create(JavaArchive.class, "commit_ejb_vehicle_ejb.jar"); // The class files commit_ejb_vehicle_ejb.addClasses( @@ -135,12 +114,12 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test UserCommitClientEjbTest.class ); // The ejb-jar.xml descriptor - URL ejbResURL = UserCommitClientEjbTest.class.getResource("/ejb_vehicle_ejb.xml"); + URL ejbResURL = UserCommitClientEjbTest.class.getClassLoader().getResource(packagePath+"/ejb_vehicle_ejb.xml"); if(ejbResURL != null) { commit_ejb_vehicle_ejb.addAsManifestResource(ejbResURL, "ejb-jar.xml"); } // The sun-ejb-jar.xml file - ejbResURL = UserCommitClientEjbTest.class.getResource("/ejb_vehicle_ejb.jar.sun-ejb-jar.xml"); + ejbResURL = UserCommitClientEjbTest.class.getClassLoader().getResource(packagePath+"/commit_ejb_vehicle_ejb.jar.sun-ejb-jar.xml"); if(ejbResURL != null) { commit_ejb_vehicle_ejb.addAsManifestResource(ejbResURL, "sun-ejb-jar.xml"); } @@ -148,27 +127,10 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test // Ear EnterpriseArchive commit_ejb_vehicle_ear = ShrinkWrap.create(EnterpriseArchive.class, "commit_ejb_vehicle.ear"); - - // Any libraries added to the ear - - // The component jars built by the package target commit_ejb_vehicle_ear.addAsModule(commit_ejb_vehicle_ejb); commit_ejb_vehicle_ear.addAsModule(commit_ejb_vehicle_client); - - - // // The application.xml descriptor - // URL earResURL = UserCommitClient.class.getResource("/com/sun/ts/tests/jta/ee/usertransaction/commit/"); - // if(earResURL != null) { - // commit_ejb_vehicle_ear.addAsManifestResource(earResURL, "application.xml"); - // } - // The sun-application.xml descriptor - URL earResURL = UserCommitClientEjbTest.class.getResource("/com/sun/ts/tests/jta/ee/usertransaction/commit/commit_ejb_vehicle_client.jar.sun-application-client.xml"); - if(earResURL != null) { - commit_ejb_vehicle_ear.addAsManifestResource(earResURL, "sun-application.xml"); - } - archiveProcessor.processEarArchive(commit_ejb_vehicle_ear, UserCommitClientEjbTest.class, earResURL); - return commit_ejb_vehicle_ear; + return commit_ejb_vehicle_ear; } @Test diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/getstatus/UserGetStatusClientEjbTest.java b/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/getstatus/UserGetStatusClientEjbTest.java index 788c68544e..8868ddf36c 100644 --- a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/getstatus/UserGetStatusClientEjbTest.java +++ b/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/getstatus/UserGetStatusClientEjbTest.java @@ -28,7 +28,6 @@ @ExtendWith(ArquillianExtension.class) @Tag("jta") @Tag("platform") -@Tag("web") @Tag("tck-appclient") public class UserGetStatusClientEjbTest extends com.sun.ts.tests.jta.ee.usertransaction.getstatus.UserGetStatusClient { @@ -53,35 +52,11 @@ public void cleanup() { logger.log(Logger.Level.INFO, "cleanup ok"); } - /** - EE10 Deployment Descriptors: - getstatus_ejb_vehicle: - getstatus_ejb_vehicle_client: META-INF/application-client.xml,jar.sun-application-client.xml - getstatus_ejb_vehicle_ejb: META-INF/ejb-jar.xml,jar.sun-ejb-jar.xml - getstatus_jsp_vehicle: - getstatus_jsp_vehicle_web: WEB-INF/web.xml,war.sun-web.xml - getstatus_servlet_vehicle: - getstatus_servlet_vehicle_web: WEB-INF/web.xml,war.sun-web.xml - - Found Descriptors: - Client: - - /com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_client.xml - Ejb: - - /com/sun/ts/tests/jta/ee/usertransaction/getstatus/ejb_vehicle_ejb.xml - /com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_ejb.xml - Ear: - - */ @TargetsContainer("tck-appclient") @OverProtocol("appclient") @Deployment(name = VEHICLE_ARCHIVE, order = 2) public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) { - // Client - // the jar with the correct archive name JavaArchive getstatus_ejb_vehicle_client = ShrinkWrap.create(JavaArchive.class, "getstatus_ejb_vehicle_client.jar"); - // The class files getstatus_ejb_vehicle_client.addClasses( com.sun.ts.tests.common.vehicle.VehicleRunnable.class, com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, @@ -93,83 +68,64 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test 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.jta.ee.common.Transact.class, + com.sun.ts.tests.jta.ee.common.TransactionStatus.class, + com.sun.ts.tests.jta.ee.common.InvalidStatusException.class, + com.sun.ts.tests.jta.ee.common.InitFailedException.class, com.sun.ts.tests.jta.ee.usertransaction.getstatus.UserGetStatusClient.class, UserGetStatusClientEjbTest.class ); // The application-client.xml descriptor - // TODO: replace display-name - URL resURL = UserGetStatusClientEjbTest.class.getResource("/vehicle/ejb/ejb_vehicle_client.xml"); + URL resURL = UserGetStatusClientEjbTest.class.getClassLoader().getResource(packagePath+"/ejb_vehicle_client.xml"); if(resURL != null) { getstatus_ejb_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 = UserGetStatusClient.class.getResource("/getstatus_jsp_vehicle_web.war.sun-web.xml"); - // if(resURL != null) { - // getstatus_ejb_vehicle_client.addAsManifestResource(resURL, "sun-web.xml"); - // } + resURL = UserGetStatusClientEjbTest.class.getClassLoader().getResource(packagePath+"/getstatus_ejb_vehicle_client.jar.sun-application-client.xml"); + if(resURL != null) { + getstatus_ejb_vehicle_client.addAsManifestResource(resURL, "sun-application-client.xml"); + } getstatus_ejb_vehicle_client.addAsManifestResource(new StringAsset("Main-Class: " + UserGetStatusClientEjbTest.class.getName() + "\n"), "MANIFEST.MF"); archiveProcessor.processClientArchive(getstatus_ejb_vehicle_client, UserGetStatusClientEjbTest.class, resURL); - // Ejb - // the jar with the correct archive name JavaArchive getstatus_ejb_vehicle_ejb = ShrinkWrap.create(JavaArchive.class, "getstatus_ejb_vehicle_ejb.jar"); // The class files getstatus_ejb_vehicle_ejb.addClasses( com.sun.ts.tests.jta.ee.usertransaction.getstatus.UserGetStatusClientEjbTest.class, - com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, - com.sun.ts.lib.harness.EETest.Fault.class, com.sun.ts.tests.jta.ee.common.Transact.class, com.sun.ts.tests.jta.ee.common.InvalidStatusException.class, - com.sun.ts.tests.common.vehicle.ejb.EJBVehicle.class, com.sun.ts.tests.jta.ee.common.InitFailedException.class, com.sun.ts.tests.jta.ee.common.TransactionStatus.class, + com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, + com.sun.ts.tests.common.vehicle.ejb.EJBVehicle.class, com.sun.ts.tests.common.vehicle.VehicleRunnable.class, com.sun.ts.tests.common.vehicle.ejb.EJBVehicleRemote.class, com.sun.ts.tests.jta.ee.common.InvalidStatusException.class, com.sun.ts.tests.jta.ee.common.InitFailedException.class, com.sun.ts.lib.harness.EETest.class, + com.sun.ts.lib.harness.EETest.Fault.class, + com.sun.ts.lib.harness.EETest.SetupException.class, com.sun.ts.lib.harness.ServiceEETest.class, com.sun.ts.tests.jta.ee.common.TransactionStatus.class, - com.sun.ts.lib.harness.EETest.SetupException.class, com.sun.ts.tests.common.vehicle.VehicleClient.class, UserGetStatusClientEjbTest.class ); // The ejb-jar.xml descriptor - URL ejbResURL = UserGetStatusClientEjbTest.class.getResource("/ejb_vehicle_ejb.xml"); + URL ejbResURL = UserGetStatusClientEjbTest.class.getClassLoader().getResource(packagePath+"/ejb_vehicle_ejb.xml"); if(ejbResURL != null) { getstatus_ejb_vehicle_ejb.addAsManifestResource(ejbResURL, "ejb-jar.xml"); } // The sun-ejb-jar.xml file - ejbResURL = UserGetStatusClientEjbTest.class.getResource("/getstatus_ejb_vehicle_ejb.jar.sun-ejb-jar.xml"); + ejbResURL = UserGetStatusClientEjbTest.class.getClassLoader().getResource(packagePath+"/getstatus_ejb_vehicle_ejb.jar.sun-ejb-jar.xml"); if(ejbResURL != null) { getstatus_ejb_vehicle_ejb.addAsManifestResource(ejbResURL, "sun-ejb-jar.xml"); } archiveProcessor.processEjbArchive(getstatus_ejb_vehicle_ejb, UserGetStatusClientEjbTest.class, ejbResURL); - // Ear EnterpriseArchive getstatus_ejb_vehicle_ear = ShrinkWrap.create(EnterpriseArchive.class, "getstatus_ejb_vehicle.ear"); - - // Any libraries added to the ear - - // The component jars built by the package target getstatus_ejb_vehicle_ear.addAsModule(getstatus_ejb_vehicle_ejb); getstatus_ejb_vehicle_ear.addAsModule(getstatus_ejb_vehicle_client); - - - - // // The application.xml descriptor - // URL earResURL = UserGetStatusClient.class.getResource("/com/sun/ts/tests/jta/ee/usertransaction/getstatus/"); - // if(earResURL != null) { - // getstatus_ejb_vehicle_ear.addAsManifestResource(earResURL, "application.xml"); - // } - // // The sun-application.xml descriptor - // earResURL = UserGetStatusClient.class.getResource("/com/sun/ts/tests/jta/ee/usertransaction/getstatus/.ear.sun-application.xml"); - // if(earResURL != null) { - // getstatus_ejb_vehicle_ear.addAsManifestResource(earResURL, "sun-application.xml"); - // } - // archiveProcessor.processEarArchive(getstatus_ejb_vehicle_ear, UserGetStatusClient.class, earResURL); - return getstatus_ejb_vehicle_ear; + return getstatus_ejb_vehicle_ear; } @Test diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/rollback/UserRollbackClientEjbTest.java b/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/rollback/UserRollbackClientEjbTest.java index 0687cad06c..8770adc05f 100644 --- a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/rollback/UserRollbackClientEjbTest.java +++ b/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/rollback/UserRollbackClientEjbTest.java @@ -28,7 +28,6 @@ @ExtendWith(ArquillianExtension.class) @Tag("jta") @Tag("platform") -@Tag("web") @Tag("tck-appclient") public class UserRollbackClientEjbTest extends com.sun.ts.tests.jta.ee.usertransaction.rollback.UserRollbackClient { @@ -53,27 +52,7 @@ public void cleanup() { logger.log(Logger.Level.INFO, "cleanup ok"); } - /** - EE10 Deployment Descriptors: - rollback_ejb_vehicle: - rollback_ejb_vehicle_client: META-INF/application-client.xml,jar.sun-application-client.xml - rollback_ejb_vehicle_ejb: META-INF/ejb-jar.xml,jar.sun-ejb-jar.xml - rollback_jsp_vehicle: - rollback_jsp_vehicle_web: WEB-INF/web.xml,war.sun-web.xml - rollback_servlet_vehicle: - rollback_servlet_vehicle_web: WEB-INF/web.xml,war.sun-web.xml - - Found Descriptors: - Client: - - /com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_client.xml - Ejb: - - /com/sun/ts/tests/jta/ee/usertransaction/rollback/ejb_vehicle_ejb.xml - /com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_ejb.xml - Ear: - - */ + @TargetsContainer("tck-appclient") @OverProtocol("appclient") @Deployment(name = VEHICLE_ARCHIVE, order = 2) @@ -93,19 +72,22 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test 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.jta.ee.common.Transact.class, + com.sun.ts.tests.jta.ee.common.TransactionStatus.class, + com.sun.ts.tests.jta.ee.common.InvalidStatusException.class, + com.sun.ts.tests.jta.ee.common.InitFailedException.class, + UserRollbackClient.class, UserRollbackClientEjbTest.class ); // The application-client.xml descriptor - //TODO :replace display-name - URL resURL = UserRollbackClientEjbTest.class.getResource("/vehicle/ejb/ejb_vehicle_client.xml"); + URL resURL = UserRollbackClientEjbTest.class.getClassLoader().getResource(packagePath+"/ejb_vehicle_client.xml"); if(resURL != null) { rollback_ejb_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 = UserRollbackClient.class.getResource("//com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_client.jar.sun-application-client.xml"); - // if(resURL != null) { - // rollback_ejb_vehicle_client.addAsManifestResource(resURL, "application-client.xml"); - // } + resURL = UserRollbackClientEjbTest.class.getClassLoader().getResource(packagePath+"/rollback_ejb_vehicle_client.jar.sun-application-client.xml"); + if(resURL != null) { + rollback_ejb_vehicle_client.addAsManifestResource(resURL, "sun-application-client.xml"); + } rollback_ejb_vehicle_client.addAsManifestResource(new StringAsset("Main-Class: " + UserRollbackClientEjbTest.class.getName() + "\n"), "MANIFEST.MF"); archiveProcessor.processClientArchive(rollback_ejb_vehicle_client, UserRollbackClientEjbTest.class, resURL); @@ -124,23 +106,20 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test com.sun.ts.tests.jta.ee.common.TransactionStatus.class, com.sun.ts.tests.common.vehicle.VehicleRunnable.class, com.sun.ts.tests.common.vehicle.ejb.EJBVehicleRemote.class, - com.sun.ts.tests.jta.ee.common.InvalidStatusException.class, com.sun.ts.tests.jta.ee.usertransaction.rollback.UserRollbackClient.class, - com.sun.ts.tests.jta.ee.common.InitFailedException.class, com.sun.ts.lib.harness.EETest.class, com.sun.ts.lib.harness.ServiceEETest.class, - com.sun.ts.tests.jta.ee.common.TransactionStatus.class, com.sun.ts.lib.harness.EETest.SetupException.class, com.sun.ts.tests.common.vehicle.VehicleClient.class, UserRollbackClientEjbTest.class ); // The ejb-jar.xml descriptor - URL ejbResURL = UserRollbackClientEjbTest.class.getResource("/ejb_vehicle_ejb.xml"); + URL ejbResURL = UserRollbackClientEjbTest.class.getClassLoader().getResource(packagePath+"/ejb_vehicle_ejb.xml"); if(ejbResURL != null) { rollback_ejb_vehicle_ejb.addAsManifestResource(ejbResURL, "ejb-jar.xml"); } // The sun-ejb-jar.xml file - ejbResURL = UserRollbackClientEjbTest.class.getResource("/rollback_ejb_vehicle_ejb.jar.sun-ejb-jar.xml"); + ejbResURL = UserRollbackClientEjbTest.class.getClassLoader().getResource(packagePath+"/rollback_ejb_vehicle_ejb.jar.sun-ejb-jar.xml"); if(ejbResURL != null) { rollback_ejb_vehicle_ejb.addAsManifestResource(ejbResURL, "sun-ejb-jar.xml"); } @@ -148,27 +127,9 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test // Ear EnterpriseArchive rollback_ejb_vehicle_ear = ShrinkWrap.create(EnterpriseArchive.class, "rollback_ejb_vehicle.ear"); - - // Any libraries added to the ear - - // The component jars built by the package target rollback_ejb_vehicle_ear.addAsModule(rollback_ejb_vehicle_ejb); rollback_ejb_vehicle_ear.addAsModule(rollback_ejb_vehicle_client); - - - - // // The application.xml descriptor - // URL earResURL = UserRollbackClient.class.getResource("/com/sun/ts/tests/jta/ee/usertransaction/rollback/"); - // if(earResURL != null) { - // rollback_ejb_vehicle_ear.addAsManifestResource(earResURL, "application.xml"); - // } - // The sun-application.xml descriptor - URL earResURL = UserRollbackClientEjbTest.class.getResource("/com/sun/ts/tests/jta/ee/usertransaction/rollback/rollback_ejb_vehicle_client.jar.sun-application-client"); - if(earResURL != null) { - rollback_ejb_vehicle_ear.addAsManifestResource(earResURL, "sun-application.xml"); - } - archiveProcessor.processEarArchive(rollback_ejb_vehicle_ear, UserRollbackClientEjbTest.class, earResURL); - return rollback_ejb_vehicle_ear; + return rollback_ejb_vehicle_ear; } @Test diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/UserSetRollbackOnlyClientEjbTest.java b/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/UserSetRollbackOnlyClientEjbTest.java index 713d1e1b34..cb388a6182 100644 --- a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/UserSetRollbackOnlyClientEjbTest.java +++ b/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/UserSetRollbackOnlyClientEjbTest.java @@ -28,7 +28,6 @@ @ExtendWith(ArquillianExtension.class) @Tag("jta") @Tag("platform") -@Tag("web") @Tag("tck-appclient") public class UserSetRollbackOnlyClientEjbTest extends com.sun.ts.tests.jta.ee.usertransaction.setrollbackonly.UserSetRollbackOnlyClient { @@ -53,35 +52,11 @@ public void cleanup() { logger.log(Logger.Level.INFO, "cleanup ok"); } - /** - EE10 Deployment Descriptors: - setrollbackonly_ejb_vehicle: - setrollbackonly_ejb_vehicle_client: META-INF/application-client.xml,jar.sun-application-client.xml - setrollbackonly_ejb_vehicle_ejb: META-INF/ejb-jar.xml,jar.sun-ejb-jar.xml - setrollbackonly_jsp_vehicle: - setrollbackonly_jsp_vehicle_web: WEB-INF/web.xml,war.sun-web.xml - setrollbackonly_servlet_vehicle: - setrollbackonly_servlet_vehicle_web: WEB-INF/web.xml,war.sun-web.xml - - Found Descriptors: - Client: - - /com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_client.xml - Ejb: - - /com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/ejb_vehicle_ejb.xml - /com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_ejb.xml - Ear: - - */ @TargetsContainer("tck-appclient") @OverProtocol("appclient") @Deployment(name = VEHICLE_ARCHIVE, order = 2) public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) { - // Client - // the jar with the correct archive name JavaArchive setrollbackonly_ejb_vehicle_client = ShrinkWrap.create(JavaArchive.class, "setrollbackonly_ejb_vehicle_client.jar"); - // The class files setrollbackonly_ejb_vehicle_client.addClasses( com.sun.ts.tests.common.vehicle.VehicleRunnable.class, com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, @@ -93,27 +68,26 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test 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.jta.ee.common.Transact.class, + com.sun.ts.tests.jta.ee.common.TransactionStatus.class, + com.sun.ts.tests.jta.ee.common.InvalidStatusException.class, + com.sun.ts.tests.jta.ee.common.InitFailedException.class, + UserSetRollbackOnlyClient.class, UserSetRollbackOnlyClientEjbTest.class ); // The application-client.xml descriptor - // TODO: replace display-name - URL resURL = UserSetRollbackOnlyClientEjbTest.class.getResource("/vehicle/ejb/ejb_vehicle_client.xml"); + URL resURL = UserSetRollbackOnlyClientEjbTest.class.getClassLoader().getResource(packagePath+"/ejb_vehicle_client.xml"); if(resURL != null) { setrollbackonly_ejb_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 = UserSetRollbackOnlyClient.class.getResource("//com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_client.jar.sun-application-client.xml"); - // if(resURL != null) { - // setrollbackonly_ejb_vehicle_client.addAsManifestResource(resURL, "application-client.xml"); - // } + resURL = UserSetRollbackOnlyClientEjbTest.class.getClassLoader().getResource(packagePath+"/setrollbackonly_ejb_vehicle_client.jar.sun-application-client.xml"); + if(resURL != null) { + setrollbackonly_ejb_vehicle_client.addAsManifestResource(resURL, "sun-application-client.xml"); + } setrollbackonly_ejb_vehicle_client.addAsManifestResource(new StringAsset("Main-Class: " + UserSetRollbackOnlyClientEjbTest.class.getName() + "\n"), "MANIFEST.MF"); archiveProcessor.processClientArchive(setrollbackonly_ejb_vehicle_client, UserSetRollbackOnlyClientEjbTest.class, resURL); - - // Ejb - // the jar with the correct archive name JavaArchive setrollbackonly_ejb_vehicle_ejb = ShrinkWrap.create(JavaArchive.class, "setrollbackonly_ejb_vehicle_ejb.jar"); - // The class files setrollbackonly_ejb_vehicle_ejb.addClasses( com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, com.sun.ts.lib.harness.EETest.Fault.class, @@ -125,22 +99,19 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test com.sun.ts.tests.jta.ee.usertransaction.setrollbackonly.UserSetRollbackOnlyClient.class, com.sun.ts.tests.common.vehicle.VehicleRunnable.class, com.sun.ts.tests.common.vehicle.ejb.EJBVehicleRemote.class, - com.sun.ts.tests.jta.ee.common.InvalidStatusException.class, - com.sun.ts.tests.jta.ee.common.InitFailedException.class, com.sun.ts.lib.harness.EETest.class, com.sun.ts.lib.harness.ServiceEETest.class, - com.sun.ts.tests.jta.ee.common.TransactionStatus.class, com.sun.ts.lib.harness.EETest.SetupException.class, com.sun.ts.tests.common.vehicle.VehicleClient.class, UserSetRollbackOnlyClientEjbTest.class ); // The ejb-jar.xml descriptor - URL ejbResURL = UserSetRollbackOnlyClientEjbTest.class.getResource("/ejb_vehicle_ejb.xml"); + URL ejbResURL = UserSetRollbackOnlyClientEjbTest.class.getClassLoader().getResource(packagePath+"/ejb_vehicle_ejb.xml"); if(ejbResURL != null) { setrollbackonly_ejb_vehicle_ejb.addAsManifestResource(ejbResURL, "ejb-jar.xml"); } // The sun-ejb-jar.xml file - ejbResURL = UserSetRollbackOnlyClientEjbTest.class.getResource("/setrollbackonly_ejb_vehicle_ejb.jar.sun-ejb-jar.xml"); + ejbResURL = UserSetRollbackOnlyClientEjbTest.class.getClassLoader().getResource(packagePath+"/setrollbackonly_ejb_vehicle_ejb.jar.sun-ejb-jar.xml"); if(ejbResURL != null) { setrollbackonly_ejb_vehicle_ejb.addAsManifestResource(ejbResURL, "sun-ejb-jar.xml"); } @@ -148,27 +119,9 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test // Ear EnterpriseArchive setrollbackonly_ejb_vehicle_ear = ShrinkWrap.create(EnterpriseArchive.class, "setrollbackonly_ejb_vehicle.ear"); - - // Any libraries added to the ear - - // The component jars built by the package target setrollbackonly_ejb_vehicle_ear.addAsModule(setrollbackonly_ejb_vehicle_ejb); setrollbackonly_ejb_vehicle_ear.addAsModule(setrollbackonly_ejb_vehicle_client); - - - - // // The application.xml descriptor - // URL earResURL = UserSetRollbackOnlyClient.class.getResource("/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/"); - // if(earResURL != null) { - // setrollbackonly_ejb_vehicle_ear.addAsManifestResource(earResURL, "application.xml"); - // } - // The sun-application.xml descriptor - URL earResURL = UserSetRollbackOnlyClientEjbTest.class.getResource("/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/setrollbackonly_ejb_vehicle_client.jar.sun-application-client.xml"); - if(earResURL != null) { - setrollbackonly_ejb_vehicle_ear.addAsManifestResource(earResURL, "sun-application.xml"); - } - archiveProcessor.processEarArchive(setrollbackonly_ejb_vehicle_ear, UserSetRollbackOnlyClientEjbTest.class, earResURL); - return setrollbackonly_ejb_vehicle_ear; + return setrollbackonly_ejb_vehicle_ear; } @Test diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/UserSetTransactionTimeoutClientEjbTest.java b/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/UserSetTransactionTimeoutClientEjbTest.java index 154d00a1f5..c4d304b116 100644 --- a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/UserSetTransactionTimeoutClientEjbTest.java +++ b/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/UserSetTransactionTimeoutClientEjbTest.java @@ -28,7 +28,6 @@ @ExtendWith(ArquillianExtension.class) @Tag("jta") @Tag("platform") -@Tag("web") @Tag("tck-appclient") public class UserSetTransactionTimeoutClientEjbTest extends com.sun.ts.tests.jta.ee.usertransaction.settransactiontimeout.UserSetTransactionTimeoutClient { @@ -53,35 +52,12 @@ public void cleanup() { logger.log(Logger.Level.INFO, "cleanup ok"); } - /** - EE10 Deployment Descriptors: - settransactiontimeout_ejb_vehicle: - settransactiontimeout_ejb_vehicle_client: META-INF/application-client.xml,jar.sun-application-client.xml - settransactiontimeout_ejb_vehicle_ejb: META-INF/ejb-jar.xml,jar.sun-ejb-jar.xml - settransactiontimeout_jsp_vehicle: - settransactiontimeout_jsp_vehicle_web: WEB-INF/web.xml,war.sun-web.xml - settransactiontimeout_servlet_vehicle: - settransactiontimeout_servlet_vehicle_web: WEB-INF/web.xml,war.sun-web.xml - Found Descriptors: - Client: - - /com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_client.xml - Ejb: - - /com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/ejb_vehicle_ejb.xml - /com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_ejb.xml - Ear: - - */ @TargetsContainer("tck-appclient") @OverProtocol("appclient") @Deployment(name = VEHICLE_ARCHIVE, order = 2) public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) { - // Client - // the jar with the correct archive name JavaArchive settransactiontimeout_ejb_vehicle_client = ShrinkWrap.create(JavaArchive.class, "settransactiontimeout_ejb_vehicle_client.jar"); - // The class files settransactiontimeout_ejb_vehicle_client.addClasses( com.sun.ts.tests.common.vehicle.VehicleRunnable.class, com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, @@ -92,27 +68,28 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test 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.common.vehicle.VehicleClient.class, + com.sun.ts.tests.jta.ee.common.Transact.class, + com.sun.ts.tests.jta.ee.common.TransactionStatus.class, + com.sun.ts.tests.jta.ee.common.InvalidStatusException.class, + com.sun.ts.tests.jta.ee.common.InitFailedException.class, + UserSetTransactionTimeoutClient.class, + UserSetTransactionTimeoutClientEjbTest.class ); // The application-client.xml descriptor - // TODO change client name - URL resURL = UserSetTransactionTimeoutClientEjbTest.class.getResource("/vehicle/ejb/ejb_vehicle_client.xml"); + URL resURL = UserSetTransactionTimeoutClientEjbTest.class.getClassLoader().getResource(packagePath+"/ejb_vehicle_client.xml"); if(resURL != null) { settransactiontimeout_ejb_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 = UserSetTransactionTimeoutClient.class.getResource("//com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_client.jar.sun-application-client.xml"); - // if(resURL != null) { - // settransactiontimeout_ejb_vehicle_client.addAsManifestResource(resURL, "application-client.xml"); - // } + resURL = UserSetTransactionTimeoutClientEjbTest.class.getClassLoader().getResource(packagePath+"/settransactiontimeout_ejb_vehicle_client.jar.sun-application-client.xml"); + if(resURL != null) { + settransactiontimeout_ejb_vehicle_client.addAsManifestResource(resURL, "sun-application-client.xml"); + } settransactiontimeout_ejb_vehicle_client.addAsManifestResource(new StringAsset("Main-Class: " + UserSetTransactionTimeoutClientEjbTest.class.getName() + "\n"), "MANIFEST.MF"); archiveProcessor.processClientArchive(settransactiontimeout_ejb_vehicle_client, UserSetTransactionTimeoutClientEjbTest.class, resURL); - // Ejb - // the jar with the correct archive name JavaArchive settransactiontimeout_ejb_vehicle_ejb = ShrinkWrap.create(JavaArchive.class, "settransactiontimeout_ejb_vehicle_ejb.jar"); - // The class files settransactiontimeout_ejb_vehicle_ejb.addClasses( com.sun.ts.tests.common.vehicle.VehicleRunnerFactory.class, com.sun.ts.lib.harness.EETest.Fault.class, @@ -124,48 +101,27 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test com.sun.ts.tests.jta.ee.common.TransactionStatus.class, com.sun.ts.tests.common.vehicle.VehicleRunnable.class, com.sun.ts.tests.common.vehicle.ejb.EJBVehicleRemote.class, - com.sun.ts.tests.jta.ee.common.InvalidStatusException.class, - com.sun.ts.tests.jta.ee.common.InitFailedException.class, com.sun.ts.lib.harness.EETest.class, com.sun.ts.lib.harness.ServiceEETest.class, - com.sun.ts.tests.jta.ee.common.TransactionStatus.class, com.sun.ts.lib.harness.EETest.SetupException.class, com.sun.ts.tests.common.vehicle.VehicleClient.class, UserSetTransactionTimeoutClientEjbTest.class ); // The ejb-jar.xml descriptor - URL ejbResURL = UserSetTransactionTimeoutClientEjbTest.class.getResource("/ejb_vehicle_ejb.xml"); + URL ejbResURL = UserSetTransactionTimeoutClientEjbTest.class.getClassLoader().getResource(packagePath+"/ejb_vehicle_ejb.xml"); if(ejbResURL != null) { settransactiontimeout_ejb_vehicle_ejb.addAsManifestResource(ejbResURL, "ejb-jar.xml"); } // The sun-ejb-jar.xml file - ejbResURL = UserSetTransactionTimeoutClientEjbTest.class.getResource("/settransactiontimeout_ejb_vehicle_ejb.jar.sun-ejb-jar.xml"); + ejbResURL = UserSetTransactionTimeoutClientEjbTest.class.getClassLoader().getResource(packagePath+"/settransactiontimeout_ejb_vehicle_ejb.jar.sun-ejb-jar.xml"); if(ejbResURL != null) { settransactiontimeout_ejb_vehicle_ejb.addAsManifestResource(ejbResURL, "sun-ejb-jar.xml"); } archiveProcessor.processEjbArchive(settransactiontimeout_ejb_vehicle_ejb, UserSetTransactionTimeoutClientEjbTest.class, ejbResURL); - // Ear EnterpriseArchive settransactiontimeout_ejb_vehicle_ear = ShrinkWrap.create(EnterpriseArchive.class, "settransactiontimeout_ejb_vehicle.ear"); - - // Any libraries added to the ear - - // The component jars built by the package target settransactiontimeout_ejb_vehicle_ear.addAsModule(settransactiontimeout_ejb_vehicle_ejb); settransactiontimeout_ejb_vehicle_ear.addAsModule(settransactiontimeout_ejb_vehicle_client); - - - // // The application.xml descriptor - // URL earResURL = UserSetTransactionTimeoutClient.class.getResource("/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/"); - // if(earResURL != null) { - // settransactiontimeout_ejb_vehicle_ear.addAsManifestResource(earResURL, "application.xml"); - // } - // The sun-application.xml descriptor - URL earResURL = UserSetTransactionTimeoutClientEjbTest.class.getResource("/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/settransactiontimeout_ejb_vehicle_client.jar.sun-application-client.xml"); - if(earResURL != null) { - settransactiontimeout_ejb_vehicle_ear.addAsManifestResource(earResURL, "sun-application.xml"); - } - archiveProcessor.processEarArchive(settransactiontimeout_ejb_vehicle_ear, UserSetTransactionTimeoutClientEjbTest.class, earResURL); return settransactiontimeout_ejb_vehicle_ear; } diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/ejb_vehicle_client.xml b/jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/ejb_vehicle_client.xml new file mode 100644 index 0000000000..7dc1092ed5 --- /dev/null +++ b/jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/ejb_vehicle_client.xml @@ -0,0 +1,28 @@ + + + + + TS ejbvehicle client + jta_ejb_vehicle_client + + ejb/EJBVehicle + Session + com.sun.ts.tests.common.vehicle.ejb.EJBVehicleRemote + + diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/ejb_vehicle_client.xml b/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/ejb_vehicle_client.xml new file mode 100644 index 0000000000..fcc1b62d04 --- /dev/null +++ b/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/ejb_vehicle_client.xml @@ -0,0 +1,28 @@ + + + + + TS ejbvehicle client + begin_ejb_vehicle_client + + ejb/EJBVehicle + Session + com.sun.ts.tests.common.vehicle.ejb.EJBVehicleRemote + + diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/ejb_vehicle_client.xml b/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/ejb_vehicle_client.xml new file mode 100644 index 0000000000..c10ff3f0c1 --- /dev/null +++ b/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/ejb_vehicle_client.xml @@ -0,0 +1,28 @@ + + + + + TS ejbvehicle client + commit_ejb_vehicle_client + + ejb/EJBVehicle + Session + com.sun.ts.tests.common.vehicle.ejb.EJBVehicleRemote + + diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/ejb_vehicle_client.xml b/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/ejb_vehicle_client.xml new file mode 100644 index 0000000000..5857d0e5bc --- /dev/null +++ b/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/ejb_vehicle_client.xml @@ -0,0 +1,28 @@ + + + + + TS ejbvehicle client + getstatus_ejb_vehicle_client + + ejb/EJBVehicle + Session + com.sun.ts.tests.common.vehicle.ejb.EJBVehicleRemote + + diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/ejb_vehicle_client.xml b/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/ejb_vehicle_client.xml new file mode 100644 index 0000000000..7b3ed2a3d0 --- /dev/null +++ b/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/ejb_vehicle_client.xml @@ -0,0 +1,28 @@ + + + + + TS ejbvehicle client + rollback_ejb_vehicle_client + + ejb/EJBVehicle + Session + com.sun.ts.tests.common.vehicle.ejb.EJBVehicleRemote + + diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/ejb_vehicle_client.xml b/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/ejb_vehicle_client.xml new file mode 100644 index 0000000000..2e5efe28cd --- /dev/null +++ b/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/ejb_vehicle_client.xml @@ -0,0 +1,28 @@ + + + + + TS ejbvehicle client + setrollbackonly_ejb_vehicle_client + + ejb/EJBVehicle + Session + com.sun.ts.tests.common.vehicle.ejb.EJBVehicleRemote + + diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/ejb_vehicle_client.xml b/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/ejb_vehicle_client.xml new file mode 100644 index 0000000000..6550b9aea6 --- /dev/null +++ b/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/ejb_vehicle_client.xml @@ -0,0 +1,28 @@ + + + + + TS ejbvehicle client + settransactiontimeout_ejb_vehicle_client + + ejb/EJBVehicle + Session + com.sun.ts.tests.common.vehicle.ejb.EJBVehicleRemote + +