Skip to content

Commit

Permalink
docs: update jakarta ee
Browse files Browse the repository at this point in the history
Signed-off-by: Otavio Santana <otaviopolianasantana@gmail.com>
  • Loading branch information
otaviojava committed Mar 16, 2024
1 parent 4710f43 commit 2673aab
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions spec/src/main/asciidoc/chapters/api/jakarta--ee.adoc
Expand Up @@ -74,9 +74,7 @@ Template template;
List<Car> cars = template.select(Car.class).where("type").eq(CarType.SPORT).result();
----

Additionally, the Jakarta NoSQL provider should provide CDI qualifiers to allow working with multiple NoSQL databases through CDI.
Developers can use these qualifiers to specify which database instance they want to inject, enabling flexibility and
compatibility with different NoSQL data stores. Jakarta NoSQL providers typically supply annotations like `@DatabaseQualifier` to annotate the injection points.
The Jakarta NoSQL provider should also provide CDI qualifiers to work with multiple NoSQL databases through CDI. Developers can use these qualifiers to specify which database instance they want to inject, enabling flexibility and compatibility with different NoSQL data stores. Jakarta NoSQL providers typically supply annotations like `@DatabaseQualifier` to annotate the injection points.

For example:

Expand All @@ -91,6 +89,15 @@ Template template;
Template anotherTemplate;
----

The template implementation bean must have:

- qualifier type `@Default`, and
- the template interface as a bean type.

Thus, the implementation is eligible for injection to unqualified injection points typed to the repository interface, as defined by section 2.4 of the CDI specification, version 4.0.

NOTE: This specification does not restrict the scope of the template implementation bean.

==== CDI Extensions for Jakarta Data Providers

In environments where CDI Full or CDI Lite is available, Jakarta NoSQL providers can leverage CDI extensions to enhance the integration and discovery of entities or implementations. While Jakarta NoSQL does not prescribe a specific type of CDI extension, it does require Jakarta NoSQL providers to ensure that template implementations are injected into appropriate injection points, typically interfaces, without additional qualifiers.
Expand Down

0 comments on commit 2673aab

Please sign in to comment.