Skip to content

Commit

Permalink
OGM-1523 Update documentation to configure WildFly 14
Browse files Browse the repository at this point in the history
  • Loading branch information
fax4ever committed Nov 26, 2018
1 parent 51879a4 commit f53abd5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 30 deletions.
1 change: 0 additions & 1 deletion documentation/manual/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@
<hibernate-orm-version>${version.org.hibernate}</hibernate-orm-version>
<hibernate-orm-major-minor-version>${parsed-version.org.hibernate.majorVersion}.${parsed-version.org.hibernate.minorVersion}</hibernate-orm-major-minor-version>
<hibernate-search-version>${version.org.hibernate.search}</hibernate-search-version>
<hibernate-search-module-slot>${module-slot.org.hibernate.search.short-id}</hibernate-search-module-slot>
<hibernate-search-major-minor-version>${parsed-version.org.hibernate.search.majorVersion}.${parsed-version.org.hibernate.search.minorVersion}</hibernate-search-major-minor-version>
<infinispan-version>${version.org.infinispan}</infinispan-version>
<jboss-jta-version>${version.org.jboss.narayana}</jboss-jta-version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,16 @@ This is the default behaviour, but you are in control and can override this all;
see the https://docs.jboss.org/author/display/WFLY10/JPA+Reference+Guide[WildFly JPA Reference Guide]
for a full list of properties you can explicitly set.

WildFly {wildfly-short-version} however does not include Hibernate OGM and the compatible Hibernate ORM and Hibernate Search
versions and it will require some configuration to make everything works.
WildFly {wildfly-short-version} however does not include Hibernate OGM and it will require some configuration to make everything works.

Hibernate OGM {hibernate-ogm-version} requires Hibernate ORM {hibernate-orm-version} and Hibernate Search {hibernate-search-version}.

[NOTE]
====
Unlike other versions, WildFly {wildfly-short-version} includes the compatible versions of Hibernate ORM and Hibernate Search.
So that, it will no longer necessary to install extra Hibrnate Search modules.
====

===== Server provisioning via Maven

Maven users can use the `wildfly-server-provisioning-maven-plugin`
Expand Down Expand Up @@ -413,39 +418,32 @@ You will also need a `server-provisioning.xml` in the root of your project:
<server-provisioning xmlns="urn:wildfly:server-provisioning:1.1">
<feature-packs>
<feature-pack
groupId="org.hibernate"
artifactId="hibernate-search-jbossmodules-orm"
version="{hibernate-search-version}" /> # <1>
<feature-pack
groupId="org.hibernate.ogm"
artifactId="hibernate-ogm-featurepack-infinispan-remote"
version="{hibernate-ogm-version}" /> # <2>
version="{hibernate-ogm-version}" /> # <1>
<feature-pack
groupId="org.hibernate.ogm"
artifactId="hibernate-ogm-featurepack-infinispan-embedded"
version="{hibernate-ogm-version}" /> # <2>
version="{hibernate-ogm-version}" /> # <1>
<feature-pack
groupId="org.hibernate.ogm"
artifactId="hibernate-ogm-featurepack-mongodb"
version="{hibernate-ogm-version}" /> # <2>
version="{hibernate-ogm-version}" /> # <1>
<feature-pack
groupId="org.hibernate.ogm"
artifactId="hibernate-ogm-featurepack-neo4j"
version="{hibernate-ogm-version}" /> # <2>
version="{hibernate-ogm-version}" /> # <1>
</feature-packs>
</server-provisioning>
----
<1> Add Hibernate Search feature pack, if you need it.
<2> Add one or more Hibernate OGM feature packs, it depends on which dialects your application needs.
<1> Add one or more Hibernate OGM feature packs, it depends on which dialects your application needs.
====

. See https://docs.jboss.org/hibernate/search/5.10/reference/en-US/html_single/#hibernatesearch-jboss-modules-feature-packs[list of available Hibernate Search feature packs].
. See <<hibernate-ogm-jboss-modules-feature-packs, list of available Hibernate OGM feature packs>>.

Once you have the archives, you need to
Expand All @@ -455,26 +453,11 @@ The modules included are:
* _org.hibernate.ogm_, the core Hibernate OGM library.
* _org.hibernate.ogm.<%DATASTORE%>_, one module for each datastore, with _<%DATASTORE%>_ being one of _infinispan_, _mongodb_ etc.
* _org.hibernate.orm_, the Hibernate ORM libraries.
* _org.hibernate.search_, the Hibernate Search libraries.
* Several shared dependencies such as _org.hibernate.hql:<%VERSION%>_ (containing the query parser) and others

The module slot to use for Hibernate OGM {hibernate-ogm-version} is `{hibernate-ogm-module-slot}`
as the format of the slot name does not include the "micro" part of the project version.

You will also need to set the property `wildfly.jpa.hibernate.search.module`
to `org.hibernate.search.orm:{hibernate-search-module-slot}` in your `persistence.xml`.
This way your application will use the right Hibernate ORM and Hibernate Search version
(and not the one shipped with WildFly).

.Property for enabling a Hibernate Search and Hibernate ORM version compatible with Hibernate OGM
====
[source, XML]
[subs="verbatim,attributes"]
----
<property name="wildfly.jpa.hibernate.search.module" value="org.hibernate.search.orm:{hibernate-search-module-slot}"/>
----
====

Now that WildFly is ready, you can include the dependencies in your application in two ways:

Include dependencies using the manifest::
Expand Down

0 comments on commit f53abd5

Please sign in to comment.