Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-4956

Automatically enable Hibernate Search in deployments and allow override properties

    Details

    • Affects:
      User Experience

      Description

      In case a deployment is using Hibernate ORM - either native Hibernate APIs or JPA - we should check if Hibernate Search also needs to be made available to the deployment (the application classpath).

      • if any entity class has the `@org.hibernate.search.annotations.Indexed` annotation
      • and/or if the persistence.xml has a any configuration property matching `hibernate.search.*`.

      If either of these is true, and the default Hibernate ORM module is being added as well, then we should also add the module org.hibernate.search.orm:main.

      If the user is overriding the Hibernate ORM version, then we shall not add this dependency either as the org.hibernate.search.orm:main module strictly refers and imports the module org.hibernate:main.

      In all cases, the user should be able to override the deployer decision using a configuration property defined in the persistence unit

      wildfly.jpa.hibernate.search.includedSlot

      • if not present, use the automatic decision rules described above, and possibly log the action being taken
      • if set to `none`, do not include Hibernate Search
      • if set to `auto`, will behave like not having set the property
      • if set to something else, use it as a slot name for the module you
        will depend on

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  smarlow Scott Marlow
                  Reporter:
                  sannegrinovero Sanne GRINOVERO
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: