use of org.jboss.as.ejb3.validator.EjbProxyNormalizerCdiExtension in project wildfly by wildfly.
the class HibernateValidatorDeploymentUnitProcessor method deploy.
@Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final CapabilityServiceSupport support = deploymentUnit.getAttachment(Attachments.CAPABILITY_SERVICE_SUPPORT);
if (support.hasCapability(WELD_CAPABILITY_NAME) && support.hasCapability(BEAN_VALIDATION_CAPABILITY)) {
try {
final WeldCapability weldCapability = support.getCapabilityRuntimeAPI(WELD_CAPABILITY_NAME, WeldCapability.class);
weldCapability.registerExtensionInstance(new EjbProxyNormalizerCdiExtension(), deploymentUnit);
} catch (CapabilityServiceSupport.NoSuchCapabilityException e) {
Assert.unreachableCode();
}
}
}
Aggregations