cdi-dev@eclipse.org.
diff --git a/api/src/main/java/jakarta/enterprise/inject/spi/BeanManager.java b/api/src/main/java/jakarta/enterprise/inject/spi/BeanManager.java
index 2224ae641..d70548ba6 100644
--- a/api/src/main/java/jakarta/enterprise/inject/spi/BeanManager.java
+++ b/api/src/main/java/jakarta/enterprise/inject/spi/BeanManager.java
@@ -227,9 +227,11 @@ public interface BeanManager extends BeanContainer {
/**
* Returns a {@link jakarta.el.ELResolver} that resolves beans by EL name.
- *
+ *
+ * @deprecated use {@code ELAwareBeanManager}, this method will be removed in CDI 5.0
* @return the {@link jakarta.el.ELResolver}
*/
+ @Deprecated(since = "4.1", forRemoval = true)
public ELResolver getELResolver();
/**
@@ -239,10 +241,11 @@ public interface BeanManager extends BeanContainer {
* {@link jakarta.el.ExpressionFactory}, the container handles destruction of objects with scope
* {@link Dependent}.
*
- *
+ * @deprecated use {@code ELAwareBeanManager}, this method will be removed in CDI 5.0
* @param expressionFactory the {@link jakarta.el.ExpressionFactory} to wrap
* @return the wrapped {@link jakarta.el.ExpressionFactory}
*/
+ @Deprecated(since = "4.1", forRemoval = true)
public ExpressionFactory wrapExpressionFactory(ExpressionFactory expressionFactory);
/**
diff --git a/api/src/main/java/jakarta/enterprise/inject/spi/EventMetadata.java b/api/src/main/java/jakarta/enterprise/inject/spi/EventMetadata.java
index c8e5c2e2b..8889e9622 100644
--- a/api/src/main/java/jakarta/enterprise/inject/spi/EventMetadata.java
+++ b/api/src/main/java/jakarta/enterprise/inject/spi/EventMetadata.java
@@ -25,8 +25,7 @@
/**
*
- * Provides access to metadata about an observed event payload. The metadata may be for events fired with either of
- * {@link Event} or {@link BeanManager#getEvent()}
+ * Provides access to metadata about an observed event payload.
*
*
* {@link EventMetadata} may only be injected into an observer method. For example:
diff --git a/el/pom.xml b/el/pom.xml
new file mode 100644
index 000000000..a724101ca
--- /dev/null
+++ b/el/pom.xml
@@ -0,0 +1,147 @@
+
+ 4.0.0
+
+
+ jakarta.enterprise
+ jakarta.enterprise.cdi-parent
+ 4.1.0-SNAPSHOT
+
+
+ jakarta.enterprise.cdi-el-api
+ jar
+
+ CDI EL integration API
+ API for integrating CDI with Unified EL
+
+
+
+ Apache License 2.0
+ https://repository.jboss.org/licenses/apache-2.0.txt
+ repo
+
+
+
+
+ 5.0.0
+
+
+
+
+
+ jakarta.enterprise
+ jakarta.enterprise.cdi-api
+ ${project.version}
+
+
+ jakarta.el
+ jakarta.el-api
+ ${uel.api.version}
+
+
+
+
+
+
+ jakarta.enterprise
+ jakarta.enterprise.cdi-api
+
+
+
+ jakarta.el
+ jakarta.el-api
+
+
+
+
+
+
+ ${project.basedir}/..
+
+ LICENSE.txt
+ NOTICE.md
+
+ META-INF
+
+
+ src/main/resources
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ ${maven-compiler-plugin.version}
+
+
+ -Xlint:all
+
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+ ${maven-bundle-plugin.version}
+
+
+ bundle-manifest
+ process-classes
+
+ manifest
+
+
+
+
+
+
+ jakarta.enterprise.inject.spi.el;version=4.1,
+
+
+ jakarta.el;version=5.0
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ ${maven-jar-plugin.version}
+
+
+ ${project.build.outputDirectory}/META-INF/MANIFEST.MF
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ ${maven-javadoc-plugin.version}
+
+ true
+ Jakarta CDI EL integration API
+ Jakarta CDI EL integration API
+ Jakarta CDI EL integration API
+ Jakarta CDI EL integration API ${project.version}]]>
+
+ cdi-dev@eclipse.org.
+Copyright © 2018,2020 Eclipse Foundation.
+Use is subject to license terms.]]>
+
+
+
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
+
+
+
+
diff --git a/el/src/main/java/jakarta/enterprise/inject/spi/el/ELAwareBeanManager.java b/el/src/main/java/jakarta/enterprise/inject/spi/el/ELAwareBeanManager.java
new file mode 100644
index 000000000..8fa8e475f
--- /dev/null
+++ b/el/src/main/java/jakarta/enterprise/inject/spi/el/ELAwareBeanManager.java
@@ -0,0 +1,34 @@
+package jakarta.enterprise.inject.spi.el;
+
+import jakarta.el.ELResolver;
+import jakarta.el.ExpressionFactory;
+import jakarta.enterprise.context.Dependent;
+import jakarta.enterprise.inject.spi.BeanManager;
+
+/**
+ * A {@link BeanManager} that allows integrators to obtain Unified EL objects
+ * that are integrated with the CDI container as described in the CDI specification.
+ *
+ * @since 4.1
+ */
+public interface ELAwareBeanManager extends BeanManager {
+ /**
+ * Returns a {@link jakarta.el.ELResolver} that resolves beans by EL name.
+ *
+ * @return the {@link jakarta.el.ELResolver}
+ */
+ public ELResolver getELResolver();
+
+ /**
+ * Returns a wrapper {@link jakarta.el.ExpressionFactory} that delegates {@link jakarta.el.MethodExpression} and
+ * {@link jakarta.el.ValueExpression} creation to the given {@link jakarta.el.ExpressionFactory}. When a Unified EL expression
+ * is evaluated using a {@link jakarta.el.MethodExpression} or {@link jakarta.el.ValueExpression} returned by the wrapper
+ * {@link jakarta.el.ExpressionFactory}, the container handles destruction of objects with scope
+ * {@link Dependent}.
+ *
+ * @param expressionFactory the {@link jakarta.el.ExpressionFactory} to wrap
+ * @return the wrapped {@link jakarta.el.ExpressionFactory}
+ */
+ public ExpressionFactory wrapExpressionFactory(ExpressionFactory expressionFactory);
+
+}
diff --git a/el/src/main/java/module-info.java b/el/src/main/java/module-info.java
new file mode 100644
index 000000000..61de99b2e
--- /dev/null
+++ b/el/src/main/java/module-info.java
@@ -0,0 +1,6 @@
+module jakarta.cdi.el {
+ exports jakarta.enterprise.inject.spi.el;
+
+ requires transitive jakarta.cdi;
+ requires transitive jakarta.el;
+}
diff --git a/el/src/main/javadoc/doc-files/speclicense.html b/el/src/main/javadoc/doc-files/speclicense.html
new file mode 100644
index 000000000..40691a7a1
--- /dev/null
+++ b/el/src/main/javadoc/doc-files/speclicense.html
@@ -0,0 +1,72 @@
+
+
+ Eclipse Foundation Specification License - v1.0
+
+
+Eclipse Foundation Specification License - v1.0
+By using and/or copying this document, or the Eclipse Foundation
+ document from which this statement is linked, you (the licensee) agree
+ that you have read, understood, and will comply with the following
+ terms and conditions:
+
+Permission to copy, and distribute the contents of this document, or
+ the Eclipse Foundation document from which this statement is linked, in
+ any medium for any purpose and without fee or royalty is hereby
+ granted, provided that you include the following on ALL copies of the
+ document, or portions thereof, that you use:
+
+
+ - link or URL to the original Eclipse Foundation document.
+ - All existing copyright notices, or if one does not exist, a notice
+ (hypertext is preferred, but a textual representation is permitted)
+ of the form: "Copyright © [$date-of-document]
+ “Eclipse Foundation, Inc. <<url to this license>>
+ "
+
+
+
+Inclusion of the full text of this NOTICE must be provided. We
+ request that authorship attribution be provided in any software,
+ documents, or other items or products that you create pursuant to the
+ implementation of the contents of this document, or any portion
+ thereof.
+
+No right to create modifications or derivatives of Eclipse Foundation
+ documents is granted pursuant to this license, except anyone may
+ prepare and distribute derivative works and portions of this document
+ in software that implements the specification, in supporting materials
+ accompanying such software, and in documentation of such software,
+ PROVIDED that all such works include the notice below. HOWEVER, the
+ publication of derivative works of this document for use as a technical
+ specification is expressly prohibited.
+
+The notice is:
+
+"Copyright © 2018 Eclipse Foundation. This software or
+ document includes material copied from or derived from [title and URI
+ of the Eclipse Foundation specification document]."
+
+Disclaimers
+
+THIS DOCUMENT IS PROVIDED "AS IS," AND THE COPYRIGHT
+ HOLDERS AND THE ECLIPSE FOUNDATION MAKE NO REPRESENTATIONS OR
+ WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
+ NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE
+ SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS
+ WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR
+ OTHER RIGHTS.
+
+THE COPYRIGHT HOLDERS AND THE ECLIPSE FOUNDATION WILL NOT BE LIABLE
+ FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT
+ OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE
+ CONTENTS THEREOF.
+
+The name and trademarks of the copyright holders or the Eclipse
+ Foundation may NOT be used in advertising or publicity pertaining to
+ this document or its contents without specific, written prior
+ permission. Title to copyright in this document will at all times
+ remain with copyright holders.
+
+
+
\ No newline at end of file
diff --git a/el/src/main/javadoc/overview.html b/el/src/main/javadoc/overview.html
new file mode 100644
index 000000000..ac47e9d49
--- /dev/null
+++ b/el/src/main/javadoc/overview.html
@@ -0,0 +1,11 @@
+
+
+
+
+The CDI EL integration API enables CDI integration with Unified EL.
+The integration entrypoint is an ELAwareBeanManager
, which allows
+obtaining a CDI-aware EL resolver and wrapping an EL expression factory into a CDI-aware one.
+
+
+
+
diff --git a/lang-model/pom.xml b/lang-model/pom.xml
index a7764cf17..8a580e4dc 100644
--- a/lang-model/pom.xml
+++ b/lang-model/pom.xml
@@ -4,7 +4,7 @@
jakarta.enterprise
jakarta.enterprise.cdi-parent
- 4.0.2-SNAPSHOT
+ 4.1.0-SNAPSHOT
jakarta.enterprise.lang-model
@@ -21,14 +21,6 @@
-
- 11
- 5.1.2
- 3.2.0
- 2.22.0
- UTF-8
-
-
@@ -46,8 +38,9 @@
+ org.apache.maven.plugins
maven-compiler-plugin
- 3.8.1
+ ${maven-compiler-plugin.version}
-Xlint:all
@@ -70,7 +63,7 @@
- jakarta.enterprise.lang.model.*;version=4.0,
+ jakarta.enterprise.lang.model.*;version=4.1,
@@ -79,7 +72,7 @@
org.apache.maven.plugins
maven-jar-plugin
- 3.2.0
+ ${maven-jar-plugin.version}
${project.build.outputDirectory}/META-INF/MANIFEST.MF
@@ -89,7 +82,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- ${maven-javadoc-plugin}
+ ${maven-javadoc-plugin.version}
true
Jakarta CDI Language Model
diff --git a/pom.xml b/pom.xml
index 2c09af90a..f196ef199 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
jakarta.enterprise
jakarta.enterprise.cdi-parent
pom
- 4.0.2-SNAPSHOT
+ 4.1.0-SNAPSHOT
Parent module for CDI Specification
@@ -33,12 +33,23 @@
spec
lang-model
api
+ el
clean package
+ UTF-8
+
+ 11
+
+ 5.1.2
+ 3.8.1
+ 3.2.0
+ 3.3.0
+ 3.0.0-M5
+
https://jakarta.oss.sonatype.org/
${sonatypeOssDistMgmtNexusUrl}content/repositories/staging/
diff --git a/spec/pom.xml b/spec/pom.xml
index 42bbe7623..02b9de90a 100644
--- a/spec/pom.xml
+++ b/spec/pom.xml
@@ -4,7 +4,7 @@
jakarta.enterprise
jakarta.enterprise.cdi-parent
- 4.0.2-SNAPSHOT
+ 4.1.0-SNAPSHOT
jakarta.enterprise.cdi-spec-doc
diff --git a/spec/src/main/asciidoc/cdi-spec.asciidoc b/spec/src/main/asciidoc/cdi-spec.asciidoc
index aaecdf30f..9f977403a 100644
--- a/spec/src/main/asciidoc/cdi-spec.asciidoc
+++ b/spec/src/main/asciidoc/cdi-spec.asciidoc
@@ -1,8 +1,8 @@
= Jakarta Contexts and Dependency Injection
:author: Jakarta Contexts and Dependency Injection Specification Project
:email: cdi-dev@eclipse.org
-:revnumber: 4.0
-:revdate: Feburary 7 2022
+:revnumber: 4.1
+:revdate: May 24 2023
:revremark: Draft
:version-label!:
:sectanchors:
diff --git a/spec/src/main/asciidoc/core/events.asciidoc b/spec/src/main/asciidoc/core/events.asciidoc
index 5c9a1805c..a743cb23f 100644
--- a/spec/src/main/asciidoc/core/events.asciidoc
+++ b/spec/src/main/asciidoc/core/events.asciidoc
@@ -530,7 +530,7 @@ Observer methods may throw exceptions:
Exception management during an asynchronous event is defined in <>.
* Otherwise, the exception aborts processing of the event.
No other observer methods of that event will be called.
-The `BeanManager.getEvent()` or `Event.fire()` method rethrows the exception.
+The `Event.fire()` method rethrows the exception.
If the exception is a checked exception, it is wrapped and rethrown as an (unchecked) `ObserverException`.
@@ -588,7 +588,7 @@ The transaction context and lifecycle contexts active when an observer method is
As specified in <>, contexts associated with built-in normal scope don't propagate across asynchronous observers.
* If the observer method is a before completion transactional observer method, it is called within the context of the transaction that is about to complete and with the same lifecycle contexts.
* Otherwise, if the observer method is any other kind of transactional observer method, it is called in an unspecified transaction context, but with the same lifecycle contexts as the transaction that just completed.
-* Otherwise, the observer method is called in the same transaction context and lifecycle contexts as the invocation of `Event.fire()` or `BeanManager.getEvent()`.
+* Otherwise, the observer method is called in the same transaction context and lifecycle contexts as the invocation of `Event.fire()`.
[[observable_container_lifecycle_events]]
diff --git a/spec/src/main/asciidoc/core/spi_full.asciidoc b/spec/src/main/asciidoc/core/spi_full.asciidoc
index a88ac8e8d..d58c81caa 100644
--- a/spec/src/main/asciidoc/core/spi_full.asciidoc
+++ b/spec/src/main/asciidoc/core/spi_full.asciidoc
@@ -389,17 +389,6 @@ public int getQualifierHashCode(Annotation qualifier);
public int getInterceptorBindingHashCode(Annotation interceptorBinding);
----
-[[bm_obtain_elresolver]]
-
-==== Obtaining the `ELResolver`
-
-The method `BeanManager.getELResolver()` returns the `jakarta.el.ELResolver` specified in <>.
-
-[source, java]
-----
-public ELResolver getELResolver();
-----
-
[[bm_obtain_annotatedtype]]
==== Obtaining an `AnnotatedType` for a class
diff --git a/spec/src/main/asciidoc/javaee/definition_ee.asciidoc b/spec/src/main/asciidoc/javaee/definition_ee.asciidoc
index 74e615ba9..b01c1fd34 100644
--- a/spec/src/main/asciidoc/javaee/definition_ee.asciidoc
+++ b/spec/src/main/asciidoc/javaee/definition_ee.asciidoc
@@ -74,7 +74,7 @@ A bean with a name may be referred to by its name in Unified EL expressions.
There is no relationship between the bean name of an EJB session bean and the EJB name of the bean.
-Bean names allow the direct use of beans in JSP or JSF pages, as defined in <>.
+Bean names allow the direct use of beans in JSP or JSF pages.
For example, a bean with the name `products` could be used like this:
[source, xml]
diff --git a/spec/src/main/asciidoc/javaee/el.asciidoc b/spec/src/main/asciidoc/javaee/el.asciidoc
new file mode 100644
index 000000000..3eef88ae4
--- /dev/null
+++ b/spec/src/main/asciidoc/javaee/el.asciidoc
@@ -0,0 +1,46 @@
+[[el]]
+== Integration with Unified EL
+
+[[el_resolution]]
+=== Bean name resolution in EL expressions
+
+The container must provide a Unified EL `ELResolver` to the servlet engine and JSF implementation that resolves bean names using the rules of name resolution defined in <> and resolving ambiguities according to <>.
+
+* If a name used in an EL expression does not resolve to any bean, the `ELResolver` must return a null value.
+* Otherwise, if a name used in an EL expression resolves to exactly one bean, the `ELResolver` must return a contextual instance of the bean, as defined in <>.
+
+[[el_support]]
+=== Unified EL integration API
+
+Since CDI version 4.1, the Unified EL integration API, which is part of the `BeanManager` API, is deprecated.
+The relevant methods are placed in a new interface `jakarta.enterprise.inject.spi.el.ELAwareBeanManager`, which is present in a new supplemental CDI API artifact: `jakarta.enterprise:jakarta.enterprise.cdi-el-api`.
+
+==== Obtaining `ELAwareBeanManager`
+
+The `BeanManager` implementation in Jakarta EE must also implement `ELAwareBeanManager`.
+All rules that apply to the `BeanManager`, as specified in <> and <>, also apply to `ELAwareBeanManager`.
+
+It follows that the container provides a built-in bean with bean type `ELAwareBeanManager`, scope `@Dependent` and qualifier `@Default`, which is a passivation capable dependency as defined in <>.
+It also follows that an `ELAwareBeanManager` may be obtained by using `CDI.current().getBeanManager()` and casting.
+
+The EL-related methods of `ELAwareBeanManager` may be called at any time during the execution of the application.
+
+==== Obtaining the `ELResolver`
+
+The method `ELAwareBeanManager.getELResolver()` returns the `jakarta.el.ELResolver` specified in <>.
+This `ELResolver` is used to satisfy the rules defined in <>.
+
+[source, java]
+----
+public ELResolver getELResolver();
+----
+
+==== Wrapping a Unified EL `ExpressionFactory`
+
+The method `ELAwareBeanManager.wrapExpressionFactory()` returns a wrapper `jakarta.el.ExpressionFactory` that delegates `MethodExpression` and `ValueExpression` creation to the given `ExpressionFactory`.
+When a Unified EL expression is evaluated using a `MethodExpression` or `ValueExpression` returned by the wrapper `ExpressionFactory`, the rules defined in <> are enforced by the container.
+
+[source, java]
+----
+public ExpressionFactory wrapExpressionFactory(ExpressionFactory expressionFactory);
+----
diff --git a/spec/src/main/asciidoc/javaee/javaeeintegration.asciidoc b/spec/src/main/asciidoc/javaee/javaeeintegration.asciidoc
index e05509ba1..fbe81db6c 100644
--- a/spec/src/main/asciidoc/javaee/javaeeintegration.asciidoc
+++ b/spec/src/main/asciidoc/javaee/javaeeintegration.asciidoc
@@ -27,3 +27,5 @@ include::events_ee.asciidoc[]
include::spi_ee.asciidoc[]
include::packagingdeployment_ee.asciidoc[]
+
+include::el.asciidoc[]
diff --git a/spec/src/main/asciidoc/javaee/packagingdeployment_ee.asciidoc b/spec/src/main/asciidoc/javaee/packagingdeployment_ee.asciidoc
index d0f95b5c0..759e31e31 100644
--- a/spec/src/main/asciidoc/javaee/packagingdeployment_ee.asciidoc
+++ b/spec/src/main/asciidoc/javaee/packagingdeployment_ee.asciidoc
@@ -56,13 +56,3 @@ When running in Jakarta EE, the container must extend the rules defined in <> and must ensure that EJB session beans are not removed from the set of discovered types.
-
-
-[[el]]
-
-=== Integration with Unified EL
-
-The container must provide a Unified EL `ELResolver` to the servlet engine and JSF implementation that resolves bean names using the rules of name resolution defined in <> and resolving ambiguities according to <>.
-
-* If a name used in an EL expression does not resolve to any bean, the `ELResolver` must return a null value.
-* Otherwise, if a name used in an EL expression resolves to exactly one bean, the `ELResolver` must return a contextual instance of the bean, as defined in <>.
diff --git a/spec/src/main/asciidoc/javaee/spi_ee.asciidoc b/spec/src/main/asciidoc/javaee/spi_ee.asciidoc
index 199020983..8493fa46f 100644
--- a/spec/src/main/asciidoc/javaee/spi_ee.asciidoc
+++ b/spec/src/main/asciidoc/javaee/spi_ee.asciidoc
@@ -40,17 +40,6 @@ A Jakarta EE container is required to provide a CDI provider that will allow acc
Jakarta EE Components may obtain an instance of `BeanManager` from JNDI by looking up the name `java:comp/BeanManager`.
-[[bm_wrap_expressionfactory]]
-
-==== Wrapping a Unified EL `ExpressionFactory`
-
-The method `BeanManager.wrapExpressionFactory()` returns a wrapper `jakarta.el.ExpressionFactory` that delegates `MethodExpression` and `ValueExpression` creation to the given `ExpressionFactory`. When a Unified EL expression is evaluated using a `MethodExpression` or `ValueExpression` returned by the wrapper `ExpressionFactory`, the rules defined in <> are enforced by the container.
-
-[source, java]
-----
-public ExpressionFactory wrapExpressionFactory(ExpressionFactory expressionFactory);
-----
-
[[alternative_metadata_sources_ee]]
=== Alternative metadata sources and EJB
diff --git a/spec/src/main/asciidoc/preface.asciidoc b/spec/src/main/asciidoc/preface.asciidoc
index d14a4b77c..233a74e5e 100644
--- a/spec/src/main/asciidoc/preface.asciidoc
+++ b/spec/src/main/asciidoc/preface.asciidoc
@@ -24,6 +24,11 @@ This document is organized in 4 parts:
=== Major changes
+==== Jakarta Contexts and Dependency Injection 4.1
+
+link:https://jakarta.ee/specifications/cdi/4.1/[CDI 4.1] deprecates the Unified EL integration API in `BeanManager` and places the relevant methods to a dedicated interface `ELAwareBeanManager`, which is present in a new supplemental API artifact: `jakarta.enterprise:jakarta.enterprise.cdi-el-api`.
+This supplemental artifact declares a JPMS module `jakarta.cdi.el`, which declares a dependency on `jakarta.cdi` and `jakarta.el`.
+
==== Jakarta Contexts and Dependency Injection 4.0
link:https://jakarta.ee/specifications/cdi/4.0/[CDI 4.0] splits the CDI core into Lite and Full. Lite contains a subset of original features which are designed to work in more restricted environments. CDI Full contains everything that is in Lite plus all other features that were formerly in core CDI and are not in Lite.
@@ -86,4 +91,4 @@ A new `beans.xml` 3.0 schema file was added and the namespace of the
`xmlns:jakartaee="https://jakarta.ee/xml/ns/jakartaee"`.
-:numbered:
\ No newline at end of file
+:numbered: