[jboss-jira] [JBoss JIRA] (WFLY-13734) JPA subsystem should fail deployment if ValidationMode.CALLBACK is configured but the BV capability is not present
Scott Marlow (Jira)
issues at jboss.org
Wed Aug 5 11:07:01 EDT 2020
[ https://issues.redhat.com/browse/WFLY-13734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14356570#comment-14356570 ]
Scott Marlow commented on WFLY-13734:
-------------------------------------
{quote}
I'm not familiar with BV, is CDI a requirement to get it working? If so, CDI already incorporates BV. That could mean we don't require to add it to jpa / jpa-distributed
{quote}
Currently, JPA, JSF + Weld, gets the ValidatorFactory from deploymentUnit.getAttachment(BeanValidationAttachments.VALIDATOR_FACTORY). We could ask but I think the idea is that a deployment should use the same ValidatorFactory instance for CDI (Weld) and JPA/JSF.
We used to have separate ValidatorFactory instances that consumed more memory.
If we do add an enhancement for ValidatorFactory instances to be created via application deployment containing ValidatorFactory implementation classes (but not the ValidatorFactory API), that probably would belong in org.jboss.as.ee.beanvalidation.BeanValidationFactoryDeployer or near it.
> 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
> Fix For: No Release
>
>
> 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