[wildfly-dev] Copies of LazyValidatorFactory

Jesper Pedersen jesper.pedersen at jboss.org
Wed Aug 21 10:09:47 EDT 2013


Hi,

On 08/21/2013 05:18 AM, Gunnar Morling wrote:
>> 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.
>

Could be an option, lets look at it once the IronJacamar 1.1 PR is in.

And for the above I meant a resource adapter implementation that 
requires extra bean validation functionality other than verifying its 
configuration properties during activation.

> 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 don't think so with the current spec - CDI beans can use the resource 
adapter objects bound in JNDI. A resource adapter implementation can't 
depend on CDI beans.

So maybe we will keep the JcaValidationFactory, since EE depends on JCA, 
and not the other way around.

Best regards,
  Jesper



More information about the wildfly-dev mailing list