-
Notifications
You must be signed in to change notification settings - Fork 55
Description
Feature epic details
- For the title of this issue, type: Documentation, Development epic name
- Link to development epic: Jakarta EE 11: Support Jakarta Contexts and Dependency Injection (CDI) 4.1 and Jakarta Interceptors 2.2 open-liberty#25085
- Target GA release: None yet. It will likely release alongside the other Jakarta EE 11 features
Operating systems
Does the documentation apply to all operating systems?
- Yes
- No; specify operating systems: ______
Summary
Provide a concise summary of your feature. What is the update, why does it matter, and to whom? What do 80% of target users need to know to be most easily productive using your runtime update?
This is a fairly small update. The new features are primarily targeted at framework authors so I don't think there's much of interest for the 80%.
However, we do need to document the new features and deprecations for the "Differences between Jakarta EE 11 and 10" page.
Configuration
List any new or changed properties, parameters, elements, attributes, etc. Include default values and configuration examples where relevant:
None
Updates to existing topics
To update existing topics, specify a link to the topics that are affected. Include a copy of the current text and the exact text to which it will change. For example: Change ABC to XYZ
Create a new topic
To create a topic, specify a first draft of the topic that you want added and the section in the navigation where the topic should go.
I assume we will have a Differences between Jakarta EE 11 and 10 page for Jakarta EE 11, similar to this one for Jakarta EE 10. This content should be included for CDI + Interceptors.
Jakarta Contexts and Dependency Injection 4.1
The Jakarta Contexts and Dependency Injection 4.1 feature (cdi-4.1) deprecates some Expression Language related methods and introduces the method invokers API.
Method invokers
The Method Invokers API is designed to allow frameworks to call application methods while having the instance and method parameters optionally being provided by CDI.
An Invoker must be created at startup by an extension using an InvokerBuilder, which can be obtained from the ProcessManagedBean event in a portable extension or from an InvokerFactory injected into a @Registration method in a build-compatible extension.
Deprecated methods
The following methods on BeanManager are deprecated for removal in the next major version:
getELResolverwrapExpressionFactory
This has been done so that the CDI API does not depend on the Expression Lanaguage API.
Replacements for these methods are available on ELAwareBeanManager which is published in a separate API jar. ELAwareBeanManager can be injected anywhere that BeanManager is valid and any BeanManager instance can be safely cast to ELAwareBeanManager.
Jakarta Interceptors 2.2
Jakarta Interceptors 2.2 adds new methods to allow an interceptor to access any binding annotations which were used to bind that interceptor to a class or method.
New methods are added to InvocationContext to obtain the binding annotations associated with the intercepted method or class:
getInterceptorBinding(Class)getInterceptorBindings()getInterceptorBindings(Class)
All binding annotations associated with the intercepted method or class are returned by these methods, whether those annotations are used directly, indirectly or were added by an extension.