[jboss-jira] [JBoss JIRA] (WFLY-4956) Automatically enable Hibernate Search in deployments and allow override properties
Sanne Grinovero (JIRA)
issues at jboss.org
Fri Jul 17 13:02:03 EDT 2015
[ https://issues.jboss.org/browse/WFLY-4956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13090546#comment-13090546 ]
Sanne Grinovero commented on WFLY-4956:
---------------------------------------
{quote}If one persistence unit definition includes wildfly.jpa.hibernate.search.includedSlot but other persistence unit definitions do not, should that be a deployment failure?{quote}
I would apply the one option which was set, and assume the other PU doesn't care what is chosen. If users have strong opinions about what we should be doing they would set the property.
{quote}If different persistence unit definitions in the deployment, are using different wildfly.jpa.hibernate.search.includedSlot settings (pu1 has wildfly.jpa.hibernate.search.includedSlot=hs5 and pu2 has wildfly.jpa.hibernate.search.includedSlot=hs6, should that be a deployment failure?{quote}
Yes that would need to fail with an appropriate error message
> 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