From 5e681b283d0f7c2f9d18f2f67e0ed1d6715ae0ae Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Mon, 25 Nov 2024 16:07:41 -0600 Subject: [PATCH 1/3] [WFLY-19776] Move the Jakarta Data integration from the wildfly-preview feature pack to shared content in wildfly-ee --- boms/common-ee/pom.xml | 22 ++++++++++++++++++ boms/preview-ee/pom.xml | 23 ------------------- .../main/asciidoc/Getting_Started_Guide.adoc | 3 +++ .../asciidoc/WildFly_and_WildFly_Preview.adoc | 3 +-- .../asciidoc/_galleon/Galleon_layers.adoc | 2 +- .../wildfly-feature-pack-build.xml | 2 ++ ee-feature-pack/galleon-shared/pom.xml | 10 ++++++++ .../standalone/jakarta-data/layer-spec.xml | 0 .../base/jakarta/data/api/main/module.xml | 0 .../extension/jakarta/data/main/module.xml | 0 preview/galleon-local/pom.xml | 9 -------- .../jboss/as/test/shared/LayersTestBase.java | 17 +++++++++++--- 12 files changed, 53 insertions(+), 38 deletions(-) rename {preview/galleon-local => ee-feature-pack/galleon-shared}/src/main/resources/layers/standalone/jakarta-data/layer-spec.xml (100%) rename {preview/galleon-local => ee-feature-pack/galleon-shared}/src/main/resources/modules/system/layers/base/jakarta/data/api/main/module.xml (100%) rename {preview/galleon-local => ee-feature-pack/galleon-shared}/src/main/resources/modules/system/layers/base/org/wildfly/extension/jakarta/data/main/module.xml (100%) diff --git a/boms/common-ee/pom.xml b/boms/common-ee/pom.xml index d2c819c64c81..9ea04952e981 100644 --- a/boms/common-ee/pom.xml +++ b/boms/common-ee/pom.xml @@ -550,6 +550,17 @@ + + ${ee.maven.groupId} + wildfly-jakarta-data + ${ee.maven.version} + + + * + * + + + ${ee.maven.groupId} wildfly-ee @@ -1400,6 +1411,17 @@ + + jakarta.data + jakarta.data-api + ${version.jakarta.data.jakarta-data-api} + + + * + * + + + jakarta.ejb jakarta.ejb-api diff --git a/boms/preview-ee/pom.xml b/boms/preview-ee/pom.xml index 7271ea0c433f..282d0252dd6b 100644 --- a/boms/preview-ee/pom.xml +++ b/boms/preview-ee/pom.xml @@ -109,17 +109,6 @@ - - jakarta.data - jakarta.data-api - ${version.jakarta.data.jakarta-data-api} - - - * - * - - - jakarta.el jakarta.el-api @@ -579,18 +568,6 @@ - - ${ee.maven.groupId} - wildfly-jakarta-data - ${ee.maven.version} - - - * - * - - - - org.wildfly.deployment wildfly-ee-9-deployment-transformer diff --git a/docs/src/main/asciidoc/Getting_Started_Guide.adoc b/docs/src/main/asciidoc/Getting_Started_Guide.adoc index d3a4fb74128b..07583b43706b 100644 --- a/docs/src/main/asciidoc/Getting_Started_Guide.adoc +++ b/docs/src/main/asciidoc/Getting_Started_Guide.adoc @@ -59,6 +59,9 @@ Profile |WildFly {wildflyVersion} Full Configuration |WildFly {wildflyVersion} D |Jakarta Contexts and Dependency Injection 4.0 |X |X |X |X +|Jakarta Data 1.0 +(xref:Admin_Guide.adoc#Feature_stability_levels[`preview` stability] )| -- |-- |-- | -- + |Jakarta Debugging Support for Other Languages 2.0 |X |X |X |X |Jakarta Dependency Injection 2.0 |X |X |X |X diff --git a/docs/src/main/asciidoc/WildFly_and_WildFly_Preview.adoc b/docs/src/main/asciidoc/WildFly_and_WildFly_Preview.adoc index 1ab87f960e4d..c7fa61dc19d6 100644 --- a/docs/src/main/asciidoc/WildFly_and_WildFly_Preview.adoc +++ b/docs/src/main/asciidoc/WildFly_and_WildFly_Preview.adoc @@ -255,5 +255,4 @@ configuration to act as a primary or backup. An embedded messaging broker also h requirements than a server primarily dedicated to handling HTTP requests would have. Note however that running an embedded broker is still supported. We've added to the $WILDFLY_HOME/docs/examples/configs folder an example ``standalone-activemq-embedded.xml`` configuration showing its use. -* link:https://jakarta.ee/specifications/data/[Jakarta Data] is a new Jakarta specification that will be part of Jakarta EE 11. WildFly Preview includes a `jakarta-data` subsystem and Galleon layer that can be used to add support for Jakarta Data. -* The Hibernate ORM integration used by the link:Developer_Guide{outfilesuffix}#JPA_Reference_Guide[JPA subsystem's] Hibernate Search feature supports using outbox polling as coordination strategy for automatic indexing. +* The Hibernate ORM integration used by the link:Developer_Guide{outfilesuffix}#JPA_Reference_Guide[JPA subsystem's] Hibernate Search feature supports using outbox polling as a coordination strategy for automatic indexing. diff --git a/docs/src/main/asciidoc/_galleon/Galleon_layers.adoc b/docs/src/main/asciidoc/_galleon/Galleon_layers.adoc index c58db7005b24..9b56b0531cc6 100644 --- a/docs/src/main/asciidoc/_galleon/Galleon_layers.adoc +++ b/docs/src/main/asciidoc/_galleon/Galleon_layers.adoc @@ -286,7 +286,7 @@ link:#gal.naming[naming] + link:#gal.base-server[base-server] + |[[gal.jaxrs-core]]jakarta-data -|Support for Jakarta Data. (xref:Admin_Guide.adoc#Feature_stability_levels[`preview` stability] in xref:WildFly_and_WildFly_Preview.adoc[WildFly Preview] only) The _link:#gal.jpa[jpa]_ dependency can be excluded and _link:#gal.jpa-distributed[jpa-distributed]_ used instead. +|Support for Jakarta Data. (xref:Admin_Guide.adoc#Feature_stability_levels[`preview` stability]) The _link:#gal.jpa[jpa]_ dependency can be excluded and _link:#gal.jpa-distributed[jpa-distributed]_ used instead. | link:#gal.jpa[jpa] OR + link:#gal.jpa-distributed[jpa-distributed] diff --git a/ee-feature-pack/galleon-feature-pack/wildfly-feature-pack-build.xml b/ee-feature-pack/galleon-feature-pack/wildfly-feature-pack-build.xml index bd07f81bb7f1..08dcc84b26ef 100644 --- a/ee-feature-pack/galleon-feature-pack/wildfly-feature-pack-build.xml +++ b/ee-feature-pack/galleon-feature-pack/wildfly-feature-pack-build.xml @@ -90,6 +90,7 @@ org.wildfly.extension.elytron org.wildfly.extension.health org.wildfly.extension.io + org.wildfly.extension.jakarta.data org.wildfly.extension.messaging-activemq org.wildfly.extension.metrics org.wildfly.extension.elytron-oidc-client @@ -133,6 +134,7 @@ org.wildfly.extension.ee-security org.wildfly.extension.elytron org.wildfly.extension.io + org.wildfly.extension.jakarta.data org.wildfly.extension.messaging-activemq org.wildfly.extension.picketlink org.wildfly.extension.request-controller diff --git a/ee-feature-pack/galleon-shared/pom.xml b/ee-feature-pack/galleon-shared/pom.xml index 960b7363d0ee..b3af980ea22b 100644 --- a/ee-feature-pack/galleon-shared/pom.xml +++ b/ee-feature-pack/galleon-shared/pom.xml @@ -693,6 +693,11 @@ jakarta.batch-api + + jakarta.data + jakarta.data-api + + jakarta.ejb jakarta.ejb-api @@ -3459,6 +3464,11 @@ + + ${ee.maven.groupId} + wildfly-jakarta-data + + org.slf4j jcl-over-slf4j diff --git a/preview/galleon-local/src/main/resources/layers/standalone/jakarta-data/layer-spec.xml b/ee-feature-pack/galleon-shared/src/main/resources/layers/standalone/jakarta-data/layer-spec.xml similarity index 100% rename from preview/galleon-local/src/main/resources/layers/standalone/jakarta-data/layer-spec.xml rename to ee-feature-pack/galleon-shared/src/main/resources/layers/standalone/jakarta-data/layer-spec.xml diff --git a/preview/galleon-local/src/main/resources/modules/system/layers/base/jakarta/data/api/main/module.xml b/ee-feature-pack/galleon-shared/src/main/resources/modules/system/layers/base/jakarta/data/api/main/module.xml similarity index 100% rename from preview/galleon-local/src/main/resources/modules/system/layers/base/jakarta/data/api/main/module.xml rename to ee-feature-pack/galleon-shared/src/main/resources/modules/system/layers/base/jakarta/data/api/main/module.xml diff --git a/preview/galleon-local/src/main/resources/modules/system/layers/base/org/wildfly/extension/jakarta/data/main/module.xml b/ee-feature-pack/galleon-shared/src/main/resources/modules/system/layers/base/org/wildfly/extension/jakarta/data/main/module.xml similarity index 100% rename from preview/galleon-local/src/main/resources/modules/system/layers/base/org/wildfly/extension/jakarta/data/main/module.xml rename to ee-feature-pack/galleon-shared/src/main/resources/modules/system/layers/base/org/wildfly/extension/jakarta/data/main/module.xml diff --git a/preview/galleon-local/pom.xml b/preview/galleon-local/pom.xml index 08c205fddfd5..4d44cd7e627f 100644 --- a/preview/galleon-local/pom.xml +++ b/preview/galleon-local/pom.xml @@ -35,10 +35,6 @@ io.opentelemetry.instrumentationopentelemetry-runtime-telemetry-java8 io.opentelemetry.semconvopentelemetry-semconv - - jakarta.data - jakarta.data-api - jakarta.el jakarta.el-api @@ -58,11 +54,6 @@ hibernate-search-mapper-orm-outbox-polling - - ${project.groupId} - wildfly-jakarta-data - - org.wildfly.deployment wildfly-ee-9-deployment-transformer diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index d8bcca85a95c..e1902f573cb4 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -63,7 +63,9 @@ public abstract class LayersTestBase { public static final String[] NO_LAYER_WILDFLY_EE = { // In 'wildfly-ee' this is only a dep of org.apache.activemq.artemis.protocol.amqp, // which is not part of test-all-layers. It is used in a layer in 'wildfly' and 'wildfly-preview' - "org.apache.qpid.proton" + "org.apache.qpid.proton", + // 'preview' stability module so not yet included in "all-layers" installation + "jakarta.data.api" }; /** @@ -88,7 +90,11 @@ public abstract class LayersTestBase { "org.wildfly.extension.mvc-krazo", "jakarta.mvc.api", "org.eclipse.krazo.core", - "org.eclipse.krazo.resteasy" + "org.eclipse.krazo.resteasy", + // 'preview' stability extension so not yet included in + // the "all-layers" installation + "org.wildfly.extension.jakarta.data", + "jakarta.data.api", }; /** @@ -239,6 +245,8 @@ public abstract class LayersTestBase { "jakarta.mvc.api", "org.eclipse.krazo.core", "org.eclipse.krazo.resteasy", + // 'preview' stability extension so not yet included in the standard configs + "org.wildfly.extension.jakarta.data", }; /** @@ -319,7 +327,10 @@ public abstract class LayersTestBase { "io.reactivex.rxjava2.rxjava", // Downstream uses this in installations provisioned with wildfly-ee but upstream does not. // To make life easier downstream we include it in wildfly-ee. - "com.fasterxml.jackson.dataformat.jackson-dataformat-yaml" + "com.fasterxml.jackson.dataformat.jackson-dataformat-yaml", + // 'preview' stability extension so not yet included in + // the "all-layers" installation or the standard configs + "org.wildfly.extension.jakarta.data" }; /** From d202473866f9f2d246d2b4e681086e5c5a261145 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Mon, 25 Nov 2024 17:04:36 -0600 Subject: [PATCH 2/3] [WFLY-19776] Add Admin Guide and Developer Guide content for Jakarta Data --- docs/src/main/asciidoc/Developer_Guide.adoc | 2 + .../_admin-guide/Subsystem_configuration.adoc | 2 + .../subsystem-configuration/Jakarta_Data.adoc | 52 ++++++ .../Simple_configuration_subsystems.adoc | 4 + .../Jakarta_Data_Reference.adoc | 169 ++++++++++++++++++ 5 files changed, 229 insertions(+) create mode 100644 docs/src/main/asciidoc/_admin-guide/subsystem-configuration/Jakarta_Data.adoc create mode 100644 docs/src/main/asciidoc/_developer-guide/Jakarta_Data_Reference.adoc diff --git a/docs/src/main/asciidoc/Developer_Guide.adoc b/docs/src/main/asciidoc/Developer_Guide.adoc index da4ec06d5ae0..96506a1d253c 100644 --- a/docs/src/main/asciidoc/Developer_Guide.adoc +++ b/docs/src/main/asciidoc/Developer_Guide.adoc @@ -49,6 +49,8 @@ include::_developer-guide/Jakarta_Contexts_and_Dependency_Injection_Reference.ad include::_developer-guide/EE_Concurrency_Utilities.adoc[] +include::_developer-guide/Jakarta_Data_Reference.adoc[] + include::_developer-guide/Jakarta_Enterprise_Beans_3_Reference_Guide.adoc[] include::_developer-guide/Jakarta_Persistence_Reference_Guide.adoc[] diff --git a/docs/src/main/asciidoc/_admin-guide/Subsystem_configuration.adoc b/docs/src/main/asciidoc/_admin-guide/Subsystem_configuration.adoc index c417bd49bd2c..1402eadb864a 100644 --- a/docs/src/main/asciidoc/_admin-guide/Subsystem_configuration.adoc +++ b/docs/src/main/asciidoc/_admin-guide/Subsystem_configuration.adoc @@ -44,6 +44,8 @@ include::subsystem-configuration/Health.adoc[] include::subsystem-configuration/Jakarta_Batch.adoc[] +include::subsystem-configuration/Jakarta_Data.adoc[] + include::subsystem-configuration/Jakarta_Enterprise_Beans_3.adoc[] include::subsystem-configuration/Jakarta_Faces.adoc[] diff --git a/docs/src/main/asciidoc/_admin-guide/subsystem-configuration/Jakarta_Data.adoc b/docs/src/main/asciidoc/_admin-guide/subsystem-configuration/Jakarta_Data.adoc new file mode 100644 index 000000000000..4c299638d400 --- /dev/null +++ b/docs/src/main/asciidoc/_admin-guide/subsystem-configuration/Jakarta_Data.adoc @@ -0,0 +1,52 @@ +[[Jakarta_Data]] += Jakarta Data Subsystem + +ifdef::env-github[] +:tip-caption: :bulb: +:note-caption: :information_source: +:important-caption: :heavy_exclamation_mark: +:caution-caption: :fire: +:warning-caption: :warning: +endif::[] + +[abstract] + +The `jakarta-data` subsystem provides support for the use of Jakarta Data in deployments. + +[WARNING] + +The `jakarta-data` subsystem is currently provided at xref:Admin_Guide.adoc#Feature_stability_levels[`preview` stability]. This means use of the subsystem requires running xref:WildFly_and_WildFly_Preview.adoc[WildFly Preview] or using the `--stability=preview` parameter when starting standard WildFly. + +[[jakarta-data-subsystem-provision]] +== Provisioning the subsystem + +When provisioning a WildFly instance, you can include Jakarta Data support in your server configuration by specifying the `jakarta-data` Galleon layer. + +//// +TODO add discussion of the need to specify config-stability-level when provisioning. But this should point to general content available via WFLY-19021 and WFLY-19172 +//// + +[[jakarta-data-subsystem-enable]] +== Enabling the subsystem + +If the WildFly configuration does not have the `jakarta-data` subsystem enabled, it can be enabled using the CLI: + +[source,options="nowrap"] +---- +[standalone@localhost:9990 /] org.wildfly.extension.jakarta.data:add +{"outcome" => "success"} +[standalone@localhost:9990 /] /subsystem=jakarta-data:add +{ + "outcome" => "success", + "response-headers" => { + "operation-requires-reload" => true, + "process-state" => "reload-required" + } +} +---- + +Note that for the `jakarta-data` subsystem to work, the `jpa` subsystem must be present in your configuration. It's present in our out-of-the-box configurations and will be included if you provision a server using the `jakarta-data` Galleon layer. + +== Configuration + +The `jakarta-data` subsystem doesn't offer any configuration options beyond its presence in the overall configuration. \ No newline at end of file diff --git a/docs/src/main/asciidoc/_admin-guide/subsystem-configuration/Simple_configuration_subsystems.adoc b/docs/src/main/asciidoc/_admin-guide/subsystem-configuration/Simple_configuration_subsystems.adoc index 5f1ccb0a4dc2..3d04b075ca85 100644 --- a/docs/src/main/asciidoc/_admin-guide/subsystem-configuration/Simple_configuration_subsystems.adoc +++ b/docs/src/main/asciidoc/_admin-guide/subsystem-configuration/Simple_configuration_subsystems.adoc @@ -14,6 +14,7 @@ element in the configuration [source,xml,options="nowrap"] ---- + @@ -26,6 +27,9 @@ The presence of each of these turns on a piece of functionality: |======================================================================= |Name |Description + +|jakarta-data| Provides support for use of Jakarta Data in deployments. Currently provided at xref:Admin_Guide.adoc#Feature_stability_levels[`preview` stability]. + |jdr |Enables the gathering of diagnostic data for use in remote analysis of error conditions. Although the data is in a simple format and could be useful to anyone, it is primarily useful for JBoss EAP diff --git a/docs/src/main/asciidoc/_developer-guide/Jakarta_Data_Reference.adoc b/docs/src/main/asciidoc/_developer-guide/Jakarta_Data_Reference.adoc new file mode 100644 index 000000000000..f3cc0f68cea8 --- /dev/null +++ b/docs/src/main/asciidoc/_developer-guide/Jakarta_Data_Reference.adoc @@ -0,0 +1,169 @@ +[[Jakarta_Data_Reference]] += Jakarta Data Reference + +ifdef::env-github[] +:tip-caption: :bulb: +:note-caption: :information_source: +:important-caption: :heavy_exclamation_mark: +:caution-caption: :fire: +:warning-caption: :warning: +endif::[] + +link:https://jakarta.ee/specifications/data[Jakarta Data] brings the repository pattern to the Jakarta ecosystem. {appservername} provides Jakarta Data support via its `jakarta-data` subsystem, which integrates https://docs.jboss.org/hibernate/orm/6.6/repositories/html_single/Hibernate_Data_Repositories.html[Hibernate Data Repositories, window=_blank], a part of Hibernate ORM. + +== Jakarta Data Overview + +The key concept in Jakarta Data is the _repository_ . As explained in the link:https://jakarta.ee/specifications/data/1.0/jakarta-data-1.0#architecture[Jakarta Data 1.0 Specification, window=_blank] + +[quote] +____ +a repository is a mediator between an application’s domain logic and the underlying data storage, be it a relational database, NoSQL database, or any other data source. + +In Jakarta Data, a Repository provides a structured and organized way to interact with data. It abstracts data storage and retrieval complexities, allowing you to work with domain-specific objects and perform common operations on data without writing low-level database queries. +____ + +An application developer defines a repository by providing an interface annotated with the Jakarta Data `@Repository` annotation. The repository interface declares methods used for data retrieval and modification of a particular link:https://jakarta.ee/specifications/data/1.0/jakarta-data-1.0#_entity_classes[entity type, window=_blank]. A repository interface can include different methods that deal with different entity types, giving application authors flexibility to define repositories that fit the needs of their application domain. + +Following is an example repository: + +[source,java] +---- +@Repository +interface Publishing { + @Find + Book book(String isbn); + + @Find + Author author(String ssn); + + @Insert + void publish(Book book); + + @Insert + void create(Author author); + + ... +} +---- + +`Book` and `Author` are typical entity classes. + +The repository interface methods are annotated with various Jakarta Data annotations (`@Insert`, `@Find`, etc) that define the expected persistence behavior of the method. + +There's much more to the Jakarta Data programming model than this; for all the details see: + +* The link:https://jakarta.ee/specifications/data/1.0/jakarta-data-1.0[Jakarta Data 1.0 specification, window=_blank] +* The link:https://docs.jboss.org/hibernate/orm/6.6/repositories/html_single/Hibernate_Data_Repositories.html[Hibernate Data Repositories documentation, window=_blank] +* Gavin King's excellent link:https://in.relation.to/2024/04/01/jakarta-data-1/[blog posts, window=_blank] on Jakarta Data + + +A Jakarta Data implementation like WildFly can support one or more Jakarta Data link:https://jakarta.ee/specifications/data/1.0/jakarta-data-1.0#_jakarta_data_providers[providers, window=_blank]. A provider understands one or more Java annotation types that are used to define entities, and it understands how to interact with a particular type of back end datastore. + +WildFly's Jakarta Data implementation supports the link:https://docs.jboss.org/hibernate/orm/6.6/repositories/html_single/Hibernate_Data_Repositories.html[Hibernate Data Repositories, window=_blank] provider, which uses Hibernate ORM to interact with a variety of different relational databases. Hibernate Data Repositories supports the `jakarta.persistence.Entity` annotation as the mechanism for application authors to define entities. + +== Using Hibernate Data Repositories in Your Application + +There are two key things to understand in order to use WildFly's Hibernate Data Repositories provider: + +* How to configure build time generation of the implementation of your `@Repository` interfaces. +* How to configure the runtime behavior of the Hibernate ORM instance that will interact with the database. + + +=== Build-time Generation of Repository Implementations + +An application author using Jakarta Data simply writes an interface for their repository, but of course for that to work at runtime there must be an actual implementation of that interface. It's the responsibility of the Jakarta Data provider to provide that implementation. Hibernate Data Repositories does this by generating the implementation classes as part of the build of your application. + +So, _to use Jakarta Data with WildFly you need to configure the generation of those classes as part of your application build_. In a Maven build this is done by configuring the Maven compiler plugin to use the `org.hibernate.orm:hibernate-jpamodelgen` artifact as an annotation processor: + +[source,xml] +---- + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.12.1 + + + + org.hibernate.orm + hibernate-jpamodelgen + + + + + + +---- + +Note that there is no version element in the `org.hibernate.orm:hibernate-jpamodelgen` declaration above. You could provide one, but best practice is to control the version in your pom's `dependencyManagement`. Importing the `org.wildfly.bom:wildfly-ee-with-tools` BOM lets you align the version of Hibernate artifacts with what's used in your target WildFly runtime: + +[source,xml] +---- + + + + + org.wildfly.bom + wildfly-ee-with-tools + ${wildfly.version} + pom + import + + + +---- + +WARNING: Some users may have learned to configure Hibernate annotation processing by declaring `org.hibernate.orm:hibernate-jpamodelgen` as a `provided` dependency in their pom. With the Hibernate version used with WildFly, link:https://docs.jboss.org/hibernate/orm/6.3/migration-guide/migration-guide.html#metamodel-generation[this will likely fail, window=_blank]. Use the `maven-compiler-plugin` configuration approach described above. + +If you're using Gradle, you'll need to use `annotationProcessor`: + +[source,groovy] +---- +annotationProcessor 'org.hibernate.orm:hibernate-jpamodelgen:6.6.1' +---- + +The generated repository implementation classes internally use various Hibernate ORM classes, so to compile the generated code you'll need to add a dependency on Hibernate: + +[source,xml] +---- + + + org.hibernate.orm + hibernate-core + provided + + +---- + +=== Configuring Hibernate ORM + +Under the covers, your repository implementation will use Hibernate ORM to interact with the database. You configure ORM by providing a `META-INF/persistence.xml` file, the same as you would with a Jakarta Persistence application: + +[source,xml] +---- + + + + + java:jboss/datasources/ExampleDS + + + + + + + + +---- + +The `jta-data-source` value should match the value of the `jndi-name` attribute in a datasource you've declared in the WildFly `datasources` or `datasources-agroal` subsystem configuration. + + +== Configuring WildFly to Support Jakarta Data + +For information on how to enable Jakarta Data support in your server configuration the see xref:Admin_Guide.adoc#Jakarta_Data[Admin Guide]. \ No newline at end of file From 3355cb4e15db18fd4d7202e150013add1068f9fb Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Mon, 25 Nov 2024 17:29:08 -0600 Subject: [PATCH 3/3] [WFLY-19776] Include Jakarta Data in WildFly Preview OOTB configuration files --- .../asciidoc/WildFly_and_WildFly_Preview.adoc | 1 + .../subsystem-configuration/Jakarta_Data.adoc | 2 +- .../Jakarta_Data_Reference.adoc | 2 +- .../feature_groups/domain-host-excludes.xml | 54 +++++++++++++++++-- .../feature_groups/domain-host-excludes.xml | 38 +++++++++---- .../standalone-microprofile-ha.xml/config.xml | 1 + .../standalone-microprofile.xml/config.xml | 1 + .../feature_groups/domain-full-ha.xml | 1 + .../resources/feature_groups/domain-full.xml | 1 + .../feature_groups/domain-ha-profile.xml | 1 + .../feature_groups/domain-profile.xml | 1 + .../layer-spec.xml | 1 + .../domain/HostExcludesTestCase.java | 2 +- .../jboss/as/test/shared/LayersTestBase.java | 5 +- 14 files changed, 90 insertions(+), 21 deletions(-) diff --git a/docs/src/main/asciidoc/WildFly_and_WildFly_Preview.adoc b/docs/src/main/asciidoc/WildFly_and_WildFly_Preview.adoc index c7fa61dc19d6..b0deea1d56c0 100644 --- a/docs/src/main/asciidoc/WildFly_and_WildFly_Preview.adoc +++ b/docs/src/main/asciidoc/WildFly_and_WildFly_Preview.adoc @@ -255,4 +255,5 @@ configuration to act as a primary or backup. An embedded messaging broker also h requirements than a server primarily dedicated to handling HTTP requests would have. Note however that running an embedded broker is still supported. We've added to the $WILDFLY_HOME/docs/examples/configs folder an example ``standalone-activemq-embedded.xml`` configuration showing its use. +* WildFly Preview includes the `jakarta-data` subsystem in its out-of-the-box `standalone.xml`, `standalone-ha.xml`, `standalone-full.xml`, `standalone-full-ha.xml`, `standalone-microprofile.xml` and `standalone-microprofile-ha.xml` configuration files. It also include the subsystem in the out-of-the-box `domain.xml` configuration file's `default`, `ha`, `full` and `full-ha` profiles. Standard WildFly includes support for the `jakarta-data` subsystem but does not include it in any out-of-the-box-configuration file. link:https://jakarta.ee/specifications/data/[Jakarta Data] is a new Jakarta specification that will be part of Jakarta EE 11. * The Hibernate ORM integration used by the link:Developer_Guide{outfilesuffix}#JPA_Reference_Guide[JPA subsystem's] Hibernate Search feature supports using outbox polling as a coordination strategy for automatic indexing. diff --git a/docs/src/main/asciidoc/_admin-guide/subsystem-configuration/Jakarta_Data.adoc b/docs/src/main/asciidoc/_admin-guide/subsystem-configuration/Jakarta_Data.adoc index 4c299638d400..381115b0e5cc 100644 --- a/docs/src/main/asciidoc/_admin-guide/subsystem-configuration/Jakarta_Data.adoc +++ b/docs/src/main/asciidoc/_admin-guide/subsystem-configuration/Jakarta_Data.adoc @@ -33,7 +33,7 @@ If the WildFly configuration does not have the `jakarta-data` subsystem enabled, [source,options="nowrap"] ---- -[standalone@localhost:9990 /] org.wildfly.extension.jakarta.data:add +[standalone@localhost:9990 /] /extension=org.wildfly.extension.jakarta.data:add {"outcome" => "success"} [standalone@localhost:9990 /] /subsystem=jakarta-data:add { diff --git a/docs/src/main/asciidoc/_developer-guide/Jakarta_Data_Reference.adoc b/docs/src/main/asciidoc/_developer-guide/Jakarta_Data_Reference.adoc index f3cc0f68cea8..65f769cc760b 100644 --- a/docs/src/main/asciidoc/_developer-guide/Jakarta_Data_Reference.adoc +++ b/docs/src/main/asciidoc/_developer-guide/Jakarta_Data_Reference.adoc @@ -166,4 +166,4 @@ The `jta-data-source` value should match the value of the `jndi-name` attribute == Configuring WildFly to Support Jakarta Data -For information on how to enable Jakarta Data support in your server configuration the see xref:Admin_Guide.adoc#Jakarta_Data[Admin Guide]. \ No newline at end of file +For information on how to enable Jakarta Data support in your server configuration, see the xref:Admin_Guide.adoc#Jakarta_Data[Admin Guide]. \ No newline at end of file diff --git a/ee-feature-pack/galleon-shared/src/main/resources/feature_groups/domain-host-excludes.xml b/ee-feature-pack/galleon-shared/src/main/resources/feature_groups/domain-host-excludes.xml index a65ac46b35a7..1f1dfd5027e0 100644 --- a/ee-feature-pack/galleon-shared/src/main/resources/feature_groups/domain-host-excludes.xml +++ b/ee-feature-pack/galleon-shared/src/main/resources/feature_groups/domain-host-excludes.xml @@ -9,26 +9,70 @@ - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/galleon-pack/galleon-local/src/main/resources/feature_groups/domain-host-excludes.xml b/galleon-pack/galleon-local/src/main/resources/feature_groups/domain-host-excludes.xml index 8be6bef15e4c..ed56ae1945b2 100644 --- a/galleon-pack/galleon-local/src/main/resources/feature_groups/domain-host-excludes.xml +++ b/galleon-pack/galleon-local/src/main/resources/feature_groups/domain-host-excludes.xml @@ -10,50 +10,70 @@ + value="["org.wildfly.extension.clustering.ejb","org.wildfly.extension.elytron-oidc-client","org.wildfly.extension.jakarta.data","org.wildfly.extension.opentelemetry","org.wildfly.extension.micrometer","org.wildfly.extension.microprofile.lra-participant","org.wildfly.extension.microprofile.lra-coordinator","org.wildfly.extension.microprofile.telemetry","org.wildfly.extension.mvc-krazo"]"/> + value="["org.wildfly.extension.clustering.ejb","org.wildfly.extension.elytron-oidc-client","org.wildfly.extension.jakarta.data","org.wildfly.extension.opentelemetry","org.wildfly.extension.micrometer","org.wildfly.extension.microprofile.lra-participant","org.wildfly.extension.microprofile.lra-coordinator","org.wildfly.extension.microprofile.telemetry","org.wildfly.extension.mvc-krazo"]"/> + value="["org.wildfly.extension.clustering.ejb","org.wildfly.extension.jakarta.data","org.wildfly.extension.micrometer","org.wildfly.extension.microprofile.lra-participant","org.wildfly.extension.microprofile.lra-coordinator","org.wildfly.extension.microprofile.telemetry","org.wildfly.extension.mvc-krazo"]"/> + value="["org.wildfly.extension.clustering.ejb","org.wildfly.extension.jakarta.data","org.wildfly.extension.micrometer","org.wildfly.extension.microprofile.lra-participant","org.wildfly.extension.microprofile.lra-coordinator","org.wildfly.extension.microprofile.telemetry","org.wildfly.extension.mvc-krazo"]"/> + value="["org.wildfly.extension.jakarta.data","org.wildfly.extension.micrometer","org.wildfly.extension.microprofile.lra-participant","org.wildfly.extension.microprofile.lra-coordinator","org.wildfly.extension.microprofile.telemetry","org.wildfly.extension.mvc-krazo"]"/> - + - + - + - + + + + + + + + + + + + + + + + + + diff --git a/preview/galleon-local/src/main/resources/configs/standalone/standalone-microprofile-ha.xml/config.xml b/preview/galleon-local/src/main/resources/configs/standalone/standalone-microprofile-ha.xml/config.xml index 3b39efd3c58d..edcf13ed9536 100644 --- a/preview/galleon-local/src/main/resources/configs/standalone/standalone-microprofile-ha.xml/config.xml +++ b/preview/galleon-local/src/main/resources/configs/standalone/standalone-microprofile-ha.xml/config.xml @@ -9,6 +9,7 @@ + diff --git a/preview/galleon-local/src/main/resources/configs/standalone/standalone-microprofile.xml/config.xml b/preview/galleon-local/src/main/resources/configs/standalone/standalone-microprofile.xml/config.xml index c061fd836dfb..546f7043aabb 100644 --- a/preview/galleon-local/src/main/resources/configs/standalone/standalone-microprofile.xml/config.xml +++ b/preview/galleon-local/src/main/resources/configs/standalone/standalone-microprofile.xml/config.xml @@ -9,6 +9,7 @@ + diff --git a/preview/galleon-local/src/main/resources/feature_groups/domain-full-ha.xml b/preview/galleon-local/src/main/resources/feature_groups/domain-full-ha.xml index 25fdb7727231..1f2550b4f9b1 100644 --- a/preview/galleon-local/src/main/resources/feature_groups/domain-full-ha.xml +++ b/preview/galleon-local/src/main/resources/feature_groups/domain-full-ha.xml @@ -37,6 +37,7 @@ + diff --git a/preview/galleon-local/src/main/resources/feature_groups/domain-full.xml b/preview/galleon-local/src/main/resources/feature_groups/domain-full.xml index a6fa774fb516..db2e512118ab 100644 --- a/preview/galleon-local/src/main/resources/feature_groups/domain-full.xml +++ b/preview/galleon-local/src/main/resources/feature_groups/domain-full.xml @@ -36,6 +36,7 @@ + diff --git a/preview/galleon-local/src/main/resources/feature_groups/domain-ha-profile.xml b/preview/galleon-local/src/main/resources/feature_groups/domain-ha-profile.xml index 0fe75242bc27..a2bb1680f545 100644 --- a/preview/galleon-local/src/main/resources/feature_groups/domain-ha-profile.xml +++ b/preview/galleon-local/src/main/resources/feature_groups/domain-ha-profile.xml @@ -13,4 +13,5 @@ + diff --git a/preview/galleon-local/src/main/resources/feature_groups/domain-profile.xml b/preview/galleon-local/src/main/resources/feature_groups/domain-profile.xml index 674ebaf8c785..8fb4145337f5 100644 --- a/preview/galleon-local/src/main/resources/feature_groups/domain-profile.xml +++ b/preview/galleon-local/src/main/resources/feature_groups/domain-profile.xml @@ -12,4 +12,5 @@ + diff --git a/preview/galleon-local/src/main/resources/layers/standalone/internal-standalone-profile/layer-spec.xml b/preview/galleon-local/src/main/resources/layers/standalone/internal-standalone-profile/layer-spec.xml index e33cf6e2fc9c..9ad689e992e2 100644 --- a/preview/galleon-local/src/main/resources/layers/standalone/internal-standalone-profile/layer-spec.xml +++ b/preview/galleon-local/src/main/resources/layers/standalone/internal-standalone-profile/layer-spec.xml @@ -34,5 +34,6 @@ + \ No newline at end of file diff --git a/testsuite/domain/src/test/java/org/jboss/as/test/integration/domain/HostExcludesTestCase.java b/testsuite/domain/src/test/java/org/jboss/as/test/integration/domain/HostExcludesTestCase.java index 2de08ce1a0e5..df36bed5181b 100644 --- a/testsuite/domain/src/test/java/org/jboss/as/test/integration/domain/HostExcludesTestCase.java +++ b/testsuite/domain/src/test/java/org/jboss/as/test/integration/domain/HostExcludesTestCase.java @@ -211,7 +211,7 @@ private static List getCurrentAddedExtensions() { // to the internal mpExtensions Set defined on this class. // Don't add here extensions supplied only by the wildfly-preview-feature-pack because we are not tracking different releases // of wildfly preview. In such a case, add them to previewExtensions set defined below. - return List.of(); + return List.of("org.wildfly.extension.jakarta.data"); } private static List getCurrentRemovedExtensions() { diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index e1902f573cb4..09304cce59e5 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -260,10 +260,7 @@ public abstract class LayersTestBase { "org.wildfly.extension.mvc-krazo", "jakarta.mvc.api", "org.eclipse.krazo.core", - "org.eclipse.krazo.resteasy", - // Extension not included in the default config - "org.wildfly.extension.jakarta.data", - // "jakarta.data.api" this is an optional dep of org.hibernate + "org.eclipse.krazo.resteasy" }; /**