Hi Jesper,

2013/8/14 Jesper Pedersen <jesper.pedersen@jboss.org>
Hi,

On 08/14/2013 03:08 PM, Farah Juma wrote:
> However, for JCA, it doesn't seem like this will be possible since the code that currently instantiates the JCAValidatorFactory doesn't have access to the deploymentUnit (and it seems like there isn't a way to modify the code to be able to access this). Another option might be to register the ValidatorFactory as a service and then perform a manual lookup on the service.
>

Currently the BeanValidation integration is used to verify JCA 1.6+
based resource adapters, and passed into the deployment chain through

AbstractResourceAdapterDeploymentService::AbstractAS7RaDeployer::getBeanValidation()

so the deployment service name is available at that point. A resource
adapter can also look up a ValidatorFactory through JNDI at run-time -
there is no access through the JCA API.

Registering the ValidatorFactory as a service sounds like a solution to me.

If looking up the VF via JNDI works I think that might be a bit simpler, as no changes on the provider side would be required. Resteasy also looks up the VF via JNDI.


Note, however, that resource adapter deployments doesn't support the CDI
model - at least vendor specific behavior. So investigating this would
be part of the JIRA.

Does this mean that CDI is never enabled for an RA deployment? Do we need to care about the CDI/BV integration in this case at all? Using the VF from the EE module might still be nice to get rid of the (copied) JcaValidatorFactory but the VF would never be CDI-aware for a non-CDI-enabled deployment.
 

> I was wondering if anyone had any thoughts about what approach to take for JCA or how to go about removing the JCAValidatorFactory. I've created WFLY-1882 [3] to track this.

Thank you. If you have a working branch feel free to add it as a comment.

Best regards,
  Jesper

_______________________________________________
wildfly-dev mailing list
wildfly-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/wildfly-dev