[jboss-jira] [JBoss JIRA] (WFLY-4956) Automatically enable Hibernate Search in deployments and allow override properties
Scott Marlow (JIRA)
issues at jboss.org
Wed Jul 22 11:35:02 EDT 2015
[ https://issues.jboss.org/browse/WFLY-4956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13091825#comment-13091825 ]
Scott Marlow commented on WFLY-4956:
------------------------------------
Instead of specifying the "wildfly.jpa.hibernate.search.includedSlot", which is unlike what we do for specifying the JPA persistence provider module names, we can instead use "wildfly.jpa.hibernate.searchModule" for identifying the module name.
if not present, we use the presence of the Indexed.class to determine if Hibernate Search dependency should be added.
if set to `none`, do not include Hibernate Search
if set to something else, use it as a module name
I left out the 'auto', since that sounds more like commenting the property out.
Changed pushed to https://github.com/scottmarlow/wildfly/tree/WFLY-4956_hibernatesearch
If all looks good, we can create an initial wildfly-core pull request to add the HibernateSearchProcessor to org.jboss.as.server.deployment.Phase
> Automatically enable Hibernate Search in deployments and allow override properties
> ----------------------------------------------------------------------------------
>
> Key: WFLY-4956
> URL: https://issues.jboss.org/browse/WFLY-4956
> Project: WildFly
> Issue Type: Feature Request
> Components: JPA / Hibernate
> Reporter: Sanne Grinovero
> Assignee: Scott Marlow
>
> 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
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the jboss-jira
mailing list