<div dir="ltr">Hi Jesper,<div class="gmail_extra"><br><div class="gmail_quote">2013/8/14 Jesper Pedersen <span dir="ltr"><<a href="mailto:jesper.pedersen@jboss.org" target="_blank">jesper.pedersen@jboss.org</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
On 08/14/2013 03:08 PM, Farah Juma wrote:<br>
> 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.<br>
><br>
<br>
Currently the BeanValidation integration is used to verify JCA 1.6+<br>
based resource adapters, and passed into the deployment chain through<br>
<br>
AbstractResourceAdapterDeploymentService::AbstractAS7RaDeployer::getBeanValidation()<br>
<br>
so the deployment service name is available at that point. A resource<br>
adapter can also look up a ValidatorFactory through JNDI at run-time -<br>
there is no access through the JCA API.<br>
<br>
Registering the ValidatorFactory as a service sounds like a solution to me.<br></blockquote><div><br></div><div>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.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Note, however, that resource adapter deployments doesn't support the CDI<br>
model - at least vendor specific behavior. So investigating this would<br>
be part of the JIRA.<br></blockquote><div><br></div><div>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.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
> 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.<br>
<br>
</div>Thank you. If you have a working branch feel free to add it as a comment.<br>
<br>
Best regards,<br>
Jesper<br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
wildfly-dev mailing list<br>
<a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a><br>
</div></div></blockquote></div><br></div></div>