[jboss-jira] [JBoss JIRA] (WFLY-13734) JPA subsystem should fail deployment if ValidationMode.CALLBACK is configured but the BV capability is not present

Brian Stansberry (Jira) issues at jboss.org
Tue Aug 4 12:09:00 EDT 2020


    [ https://issues.redhat.com/browse/WFLY-13734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14353292#comment-14353292 ] 

Brian Stansberry commented on WFLY-13734:
-----------------------------------------

[~yersan]. FYI re this discussion. This makes me wonder whether the jpa / jpa-distributed layers need to have the bean-validation layer as an optional dependency.

The primary 'server' layers that incorporate JPA ('cloud-server' and 'jaxrs-server') already include the bean-validation layer, so for anyone using those adding b-v as a dep to jpa would have no practical impact.  But for someone adding jpa to some other base, a change may mean they now get b-v when they didn't want it. They can exclude it though.

I'm fine with what [~smarlow] thinks is best here. But if we are going to change anything it must happen with WF 21; after that this layer should be locked down.

> JPA subsystem should fail deployment if ValidationMode.CALLBACK is configured but the BV capability is not present
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: WFLY-13734
>                 URL: https://issues.redhat.com/browse/WFLY-13734
>             Project: WildFly
>          Issue Type: Bug
>          Components: JPA / Hibernate
>            Reporter: Brian Stansberry
>            Assignee: Scott Marlow
>            Priority: Major
>
> This is a follow-on to https://github.com/wildfly/wildfly/pull/13444 / WFLY-13726.  That fix is about applying logic consistently in both places where PersistenceUnitServiceHandler integrates with BV. But I suspect the existing handling isn't correct in the case where ValidationMode.CALLBACK is configured. The javadoc for that enum value says "The persistence provider must perform the lifecycle event validation.  It is an error if there is no Bean Validation provider present in the environment." But I think our handling is ignoring that if the BV capability is not present.



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list