[bv-dev] bv-dev] [BVAL-251] Improve Bean Validation support for modularized environments
Gunnar Morling
gunnar.morling at googlemail.com
Fri May 4 06:56:59 EDT 2012
Hi,
> Seems everyone is tired of OSGi? Maybe adding the OSGi header is as far as we should go.
It has been a while since I've played around a bit with BVAL-251. I
still think some (standardized) OSGi support would be a good thing.
I've worked on the basic discovery (there are branches for the API [1]
and HV [2]) and I definitely would like to investigate the area a bit
more (would we need special message interpolators etc.), but since
then I just haven't found enough time to continue with the issue. I
hope I can continue with that within the next time. Maybe Kevin has
also some news on that.
Regarding the class loader service, this might be a good idea. I think
we should see which specific use cases there are (which related
problems currently exist etc.) in order to come up with a solution. It
would also be interesting to know how Apache Validation does class
loading. OSGi of course could be an area where such a service might be
very beneficial.
--Gunnar
[1] https://github.com/gunnarmorling/beanvalidation-api/tree/BVAL-251
[2] https://github.com/gunnarmorling/hibernate-validator/tree/BVAL-251
2012/5/4 Hardy Ferentschik <hardy at hibernate.org>:
> Hi,
>
> Seems everyone is tired of OSGi? Maybe adding the OSGi header is as far as we should go.
>
> However, I would like to use this thread to a related question - class loading.
> At several occasions Hibernate Validator needs to do some class loading or at least needs a class loader
> (e.g. loading classes specified in the xml configuration, detecting whether JPA is on the classpath in the case
> of TraversableResolver, loading resource bundles).
>
> The spec does not define which class loader should be used in these cases. Hibernate Validator for example
> first tries the context and then the current class loader. The question is whether there is a need to specify which
> class loader should be used or should there even be a ClassLoaderService:
>
> public interface ClassLoaderService {
> public <T> Class<T> classForName(String className);
>
> // potentially more class loader related methods
> ….
> }
>
> An implementation of such a service could be passed if we add javax.validation.Configuration#classLoaderService(ClassLoaderService).
>
> WDYT?
>
> --Hardy
>
>
> On Apr 24, 2012, at 10:07 AM, Emmanuel Bernard wrote:
>
>>
>> On 13 avr. 2012, at 13:37, Hardy Ferentschik wrote:
>>
>>> Emmanuel, you mentioned that we might align CDI in regards to OSGi. Are there any news there?
>>
>> Not that I know of.
>
>
> _______________________________________________
> beanvalidation-dev mailing list
> beanvalidation-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
More information about the beanvalidation-dev
mailing list