diff --git a/appserver/tests/tck/cdi/cdi-full/pom.xml b/appserver/tests/tck/cdi/cdi-full/pom.xml
index c2759c61868..dbbff5c736c 100644
--- a/appserver/tests/tck/cdi/cdi-full/pom.xml
+++ b/appserver/tests/tck/cdi/cdi-full/pom.xml
@@ -27,7 +27,7 @@
glassfish-external-tck-cdi
- CDI TCK Full runner 4.0 for Weld (GlassFish)
+ CDI TCK Full runner 4.1 for Weld (GlassFish)
Aggregates dependencies and runs the CDI TCK on GlassFish
@@ -38,6 +38,11 @@
jakarta.enterprise.cdi-api
provided
+
+ jakarta.enterprise
+ jakarta.enterprise.cdi-el-api
+ provided
+
jakarta.el
jakarta.el-api
@@ -134,7 +139,7 @@
jakarta.enterprise
cdi-tck-api
- ${cdi.tck-4-0.version}
+ ${cdi.tck-4-1.version}
test
@@ -151,7 +156,7 @@
jakarta.enterprise
cdi-tck-core-impl
- ${cdi.tck-4-0.version}
+ ${cdi.tck-4-1.version}
test
@@ -161,14 +166,12 @@
-
jakarta.enterprise
- cdi-tck-web-impl
- ${cdi.tck-4-0.version}
+ cdi-tck-core-impl
+ ${cdi.tck-4-1.version}
+ xml
+ suite
test
@@ -178,7 +181,6 @@
-
org.glassfish.expressly
expressly
@@ -207,7 +209,7 @@
org.testng
testng
- 7.4.0
+ 7.9.0
test
@@ -226,7 +228,7 @@
org.omnifaces.arquillian
arquillian-glassfish-server-managed
- 1.4
+ 1.5
test
@@ -271,19 +273,19 @@
jakarta.enterprise
- cdi-tck-web-impl
- ${cdi.tck-4-0.version}
+ cdi-tck-core-impl
+ ${cdi.tck-4-1.version}
xml
suite
- false
- tck-web-suite.xml
+ false
+ tck-core-suite.xml
target/suites
@@ -313,7 +315,7 @@
-
+
install-cdi-tck-ext-lib
pre-integration-test
@@ -325,7 +327,7 @@
jakarta.enterprise
cdi-tck-ext-lib
- ${cdi.tck-4-0.version}
+ ${cdi.tck-4-1.version}
jar
true
${glassfish.root}/glassfish8/glassfish/domains/domain1/lib/applibs
@@ -344,7 +346,7 @@
- target/suites/tck-web-suite.xml
+ target/suites/tck-core-suite.xml
${excluded.groups}
diff --git a/appserver/tests/tck/cdi/cdi-full/src/test/java/org/jboss/weld/tck/glassfish/GlassFishContextualsImpl.java b/appserver/tests/tck/cdi/cdi-full/src/test/java/org/jboss/weld/tck/glassfish/GlassFishContextualsImpl.java
new file mode 100644
index 00000000000..0c1ea19ae85
--- /dev/null
+++ b/appserver/tests/tck/cdi/cdi-full/src/test/java/org/jboss/weld/tck/glassfish/GlassFishContextualsImpl.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2024 Eclipse Foundation and/or its affiliates.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+package org.jboss.weld.tck.glassfish;
+
+import jakarta.enterprise.context.spi.Context;
+import jakarta.enterprise.context.spi.CreationalContext;
+import org.jboss.cdi.tck.spi.Contextuals;
+
+public class GlassFishContextualsImpl implements Contextuals {
+
+ @Override
+ public Inspectable create(T instance, Context context) {
+ return new InspectableContextual<>(instance);
+ }
+
+ static class InspectableContextual implements Inspectable {
+
+ private T instancePassedToConstructor;
+ private T instancePassedToDestroy;
+
+ private CreationalContext creationalContextPassedToCreate;
+ private CreationalContext creationalContextPassedToDestroy;
+
+ InspectableContextual(T instance) {
+ this.instancePassedToConstructor = instance;
+ }
+
+ @Override
+ public T create(CreationalContext creationalContext) {
+ this.creationalContextPassedToCreate = creationalContext;
+ return instancePassedToConstructor;
+ }
+
+ @Override
+ public void destroy(T instance, CreationalContext creationalContext) {
+ instancePassedToDestroy = instance;
+ creationalContextPassedToDestroy = creationalContext;
+ }
+
+ @Override
+ public CreationalContext getCreationalContextPassedToCreate() {
+ return creationalContextPassedToCreate;
+ }
+
+ @Override
+ public T getInstancePassedToDestroy() {
+ return instancePassedToDestroy;
+ }
+
+ @Override
+ public CreationalContext getCreationalContextPassedToDestroy() {
+ return creationalContextPassedToDestroy;
+ }
+ }
+
+}
diff --git a/appserver/tests/tck/cdi/cdi-full/src/test/java/org/jboss/weld/tck/glassfish/GlassFishCreationalContextsImpl.java b/appserver/tests/tck/cdi/cdi-full/src/test/java/org/jboss/weld/tck/glassfish/GlassFishCreationalContextsImpl.java
new file mode 100644
index 00000000000..05f52b3c2e2
--- /dev/null
+++ b/appserver/tests/tck/cdi/cdi-full/src/test/java/org/jboss/weld/tck/glassfish/GlassFishCreationalContextsImpl.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2024 Contributors to the Eclipse Foundation.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+package org.jboss.weld.tck.glassfish;
+
+import jakarta.enterprise.context.spi.Contextual;
+import org.jboss.cdi.tck.spi.CreationalContexts;
+import org.jboss.weld.contexts.CreationalContextImpl;
+
+/**
+ * This returns the Weld (and thus GlassFish) specific CreationalContextImpl with added methods
+ * for inspection.
+ */
+public class GlassFishCreationalContextsImpl implements CreationalContexts {
+
+ @Override
+ public Inspectable create(Contextual contextual) {
+ return new InspectableCreationalContext<>(contextual);
+ }
+
+ static class InspectableCreationalContext extends CreationalContextImpl implements Inspectable {
+
+ private T lastBeanPushed;
+ private boolean pushCalled;
+ private boolean releaseCalled;
+
+ public InspectableCreationalContext(Contextual contextual) {
+ super(contextual);
+ }
+
+ @Override
+ public void push(T incompleteInstance) {
+ lastBeanPushed = incompleteInstance;
+
+ pushCalled = true;
+ super.push(incompleteInstance);
+ }
+
+ @Override
+ public Object getLastBeanPushed() {
+ return lastBeanPushed;
+ }
+
+ @Override
+ public boolean isPushCalled() {
+ return pushCalled;
+ }
+
+ @Override
+ public boolean isReleaseCalled() {
+ return releaseCalled;
+ }
+
+ @Override
+ public void release(Contextual contextual, T instance) {
+ releaseCalled = true;
+ super.release(contextual, instance);
+ }
+
+ @Override
+ public void release() {
+ releaseCalled = true;
+ super.release();
+ }
+
+ }
+
+}
diff --git a/appserver/tests/tck/cdi/cdi-full/src/test/resources/META-INF/cdi-tck.properties b/appserver/tests/tck/cdi/cdi-full/src/test/resources/META-INF/cdi-tck.properties
index ca7b589f170..d04503bf95e 100644
--- a/appserver/tests/tck/cdi/cdi-full/src/test/resources/META-INF/cdi-tck.properties
+++ b/appserver/tests/tck/cdi/cdi-full/src/test/resources/META-INF/cdi-tck.properties
@@ -1,5 +1,7 @@
org.jboss.cdi.tck.spi.Beans=org.jboss.weld.tck.glassfish.GlassFishBeansImpl
+org.jboss.cdi.tck.spi.CreationalContexts=org.jboss.weld.tck.glassfish.GlassFishCreationalContextsImpl
org.jboss.cdi.tck.spi.Contexts=org.jboss.weld.tck.glassfish.GlassFishContextImpl
+org.jboss.cdi.tck.spi.Contextuals=org.jboss.weld.tck.glassfish.GlassFishContextualsImpl
org.jboss.cdi.tck.spi.EL=org.jboss.weld.tck.glassfish.GlassFishELImpl
org.jboss.cdi.tck.testDataSource=jdbc/__default
org.jboss.cdi.tck.testJmsConnectionFactory=java:comp/DefaultJMSConnectionFactory
diff --git a/appserver/tests/tck/cdi/cdi-model/pom.xml b/appserver/tests/tck/cdi/cdi-model/pom.xml
index 9010eeb8033..ed8de4d6ac7 100644
--- a/appserver/tests/tck/cdi/cdi-model/pom.xml
+++ b/appserver/tests/tck/cdi/cdi-model/pom.xml
@@ -18,7 +18,7 @@
-->
4.0.0
-
+
org.glassfish.main.tests.tck
glassfish-external-tck-cdi-parent
@@ -46,7 +46,7 @@
jakarta.enterprise
cdi-tck-lang-model
- ${cdi.tck-4-0.version}
+ ${cdi.tck-4-1.version}
test
@@ -94,7 +94,7 @@
-
+
maven-dependency-plugin
@@ -120,7 +120,7 @@
-
+
maven-surefire-plugin
@@ -156,7 +156,7 @@
-
+
full
diff --git a/appserver/tests/tck/cdi/cdi-signature/pom.xml b/appserver/tests/tck/cdi/cdi-signature/pom.xml
index 34d16eca8a0..7b4aebc7673 100644
--- a/appserver/tests/tck/cdi/cdi-signature/pom.xml
+++ b/appserver/tests/tck/cdi/cdi-signature/pom.xml
@@ -48,7 +48,7 @@
jakarta.enterprise
cdi-tck-core-impl
- ${cdi.tck-4-0.version}
+ ${cdi.tck-4-1.version}
sig
sigtest-jdk11
${project.build.directory}/sigtest
diff --git a/appserver/tests/tck/cdi/pom.xml b/appserver/tests/tck/cdi/pom.xml
index 011426a7cae..50d753a84dd 100644
--- a/appserver/tests/tck/cdi/pom.xml
+++ b/appserver/tests/tck/cdi/pom.xml
@@ -43,7 +43,7 @@
UTF-8
UTF-8
- 4.0.13
+ 4.1.0
2.50.0
@@ -51,7 +51,7 @@
${project.version}
${project.build.directory}
- ${glassfish.root}/glassfish7
+ ${glassfish.root}/glassfish8