diff --git a/glassfish-runner/jpa-platform-tck/pom.xml b/glassfish-runner/jpa-platform-tck/pom.xml index 6fdc6365a3..e96aa6196f 100644 --- a/glassfish-runner/jpa-platform-tck/pom.xml +++ b/glassfish-runner/jpa-platform-tck/pom.xml @@ -332,6 +332,17 @@ derbytools 10.15.2.0 + + org.glassfish.main.deployment + dol + ${glassfish.container.version} + + + jakarta.tck + persistence-platform-tck-tests + 11.0.0-SNAPSHOT + compile + @@ -616,6 +627,8 @@ /tmp ${project.basedir} rest-arquillian.xml + true + false ${project.build.directory}/${glassfish.toplevel.dir} diff --git a/jpa/platform-tests/src/main/java/ee/jakarta/tck/persistence/ee/cdi/ServletEMLookupTest.java b/jpa/platform-tests/src/main/java/ee/jakarta/tck/persistence/ee/cdi/ServletEMLookupTest.java index 42421108e0..d4692ad56d 100644 --- a/jpa/platform-tests/src/main/java/ee/jakarta/tck/persistence/ee/cdi/ServletEMLookupTest.java +++ b/jpa/platform-tests/src/main/java/ee/jakarta/tck/persistence/ee/cdi/ServletEMLookupTest.java @@ -27,9 +27,9 @@ public class ServletEMLookupTest { @ArquillianResource URL contextPath; - @Deployment(name = "rest-em-lookup", testable = false) + @Deployment(name = "jpa-cdi-em-inject", testable = false) public static WebArchive deployment(@ArquillianResource TestArchiveProcessor archiveProcessor) { - WebArchive war = ShrinkWrap.create(WebArchive.class, "rest-em-lookup.war") + WebArchive war = ShrinkWrap.create(WebArchive.class) .addClasses(CtsEmQualifier.class, CtsEmNoTxQualifier.class, JaxRsActivator.class, TestBeanEM.class, RestEndpoint.class); diff --git a/jpa/platform-tests/src/main/java/ee/jakarta/tck/persistence/ee/cdi/TestBeanEM.java b/jpa/platform-tests/src/main/java/ee/jakarta/tck/persistence/ee/cdi/TestBeanEM.java index 1318f56199..7097fe1450 100644 --- a/jpa/platform-tests/src/main/java/ee/jakarta/tck/persistence/ee/cdi/TestBeanEM.java +++ b/jpa/platform-tests/src/main/java/ee/jakarta/tck/persistence/ee/cdi/TestBeanEM.java @@ -3,6 +3,7 @@ import jakarta.inject.Inject; import jakarta.enterprise.context.RequestScoped; import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import java.util.logging.Logger; @@ -13,12 +14,12 @@ public class TestBeanEM { Logger logger = Logger.getLogger(TestBeanEM.class.getName()); - //@PersistenceUnit(unitName = "CTS-EM") - @CtsEmQualifier - @Inject + @PersistenceContext(unitName = "CTS-EM") + //@CtsEmQualifier + //@Inject private EntityManager em1; - //@PersistenceUnit(unitName = "CTS-EM-NOTX") - @CtsEmNoTxQualifier + //@PersistenceContext(unitName = "CTS-EM2") + @CtsEmQualifier @Inject private EntityManager em2; diff --git a/jpa/platform-tests/src/main/java/ee/jakarta/tck/persistence/ee/cdi/persistence.xml b/jpa/platform-tests/src/main/java/ee/jakarta/tck/persistence/ee/cdi/persistence.xml index 991638ee39..4d33a9dc07 100644 --- a/jpa/platform-tests/src/main/java/ee/jakarta/tck/persistence/ee/cdi/persistence.xml +++ b/jpa/platform-tests/src/main/java/ee/jakarta/tck/persistence/ee/cdi/persistence.xml @@ -29,6 +29,7 @@ Persistence Unit for CTS Vehicle Tests + ee.jakarta.tck.persistence.ee.cdi.CtsEmQualifier jdbc/DB1 ee.jakarta.tck.persistence.ee.entityManager.Order @@ -36,7 +37,6 @@ The persistence.xml file may be used to designate more than one persistence unit within the same scope. Persistence Unit for Application Managed Resource Local - ee.jakarta.tck.persistence.ee.cdi.CtsEmNoTxQualifier jdbc/DB_no_tx ee.jakarta.tck.persistence.ee.entityManager.Order