You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/main/asciidoc/cdi-reference.adoc
+31-3Lines changed: 31 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,9 +11,10 @@ include::_attributes.adoc[]
11
11
:sectnums:
12
12
:sectnumlevels: 4
13
13
14
-
Quarkus DI solution (also called ArC) is based on the https://jakarta.ee/specifications/cdi/2.0/cdi-spec-2.0.html[Contexts and Dependency Injection for Java 2.0, window="_blank"] specification.
15
-
However, it is not a full CDI implementation verified by the TCK.
16
-
Only a subset of the CDI features is implemented - see also <<supported_features,the list of supported features>> and <<limitations,the list of limitations>>.
14
+
Quarkus DI solution (also called ArC) is based on the https://jakarta.ee/specifications/cdi/4.0/jakarta-cdi-spec-4.0.html[Jakarta Contexts and Dependency Injection 4.0, window="_blank"] specification.
15
+
It aims to implement the CDI Lite specification, with selected improvements on top.
16
+
It is not a CDI Full implementation and is not verified by the TCK yet.
17
+
See also <<supported_features,the list of supported features>> and <<limitations,the list of limitations>>.
17
18
18
19
TIP: If you're new to CDI then we recommend you to read the xref:cdi.adoc[Introduction to CDI] first.
19
20
@@ -741,6 +742,7 @@ class Services {
741
742
+
742
743
NOTE: Interceptors can use `InvocationContext.getMethod()` to detect static methods and adjust the behavior accordingly.
743
744
745
+
[[unproxyable_classes_transformation]]
744
746
=== Ability to handle 'final' classes and methods
745
747
746
748
In normal CDI, classes that are marked as `final` and / or have `final` methods are not eligible for proxy creation,
@@ -1081,6 +1083,32 @@ NOTE: These endpoints are only available in the development mode, i.e. when you
1081
1083
In the development mode, it is also possible to enable monitoring of business method invocations and fired events.
1082
1084
Simply set the `quarkus.arc.dev-mode.monitoring-enabled` configuration property to `true` and explore the relevant Dev UI pages.
1083
1085
1086
+
[[strict_mode]]
1087
+
== Strict Mode
1088
+
1089
+
By default, ArC does not perform all validations required by the CDI specification.
1090
+
It also improves CDI usability in many ways, some of them being directly against the specification.
1091
+
1092
+
To be able to eventually pass the CDI Lite TCK, ArC also has a _strict_ mode.
1093
+
This mode enables additional validations and disables certain improvements that conflict with the specification.
1094
+
1095
+
To enable the strict mode, use the following configuration:
1096
+
1097
+
[source,properties]
1098
+
----
1099
+
quarkus.arc.strict-compatibility=true
1100
+
----
1101
+
1102
+
Some other features affect specification compatibility as well:
1103
+
1104
+
* <<unproxyable_classes_transformation,Transformation of unproxyable classes>>
1105
+
* <<remove_unused_beans,Unused beans removal>>
1106
+
1107
+
To get a behavior closer to the specification, these features should also be disabled.
1108
+
1109
+
Applications are recommended to use the default, non-strict mode, which makes CDI more convenient to use.
1110
+
The "strictness" of the strict mode (the set of additional validations and the set of disabled improvements on top of the CDI specification) may change over time.
0 commit comments