[hibernate-issues] [Hibernate-JIRA] Commented: (HV-582) Introduce a class loading service

Emmanuel Bernard (JIRA) noreply at atlassian.com
Sun May 13 13:12:11 EDT 2012


    [ https://hibernate.onjira.com/browse/HV-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46640#comment-46640 ] 

Emmanuel Bernard commented on HV-582:
-------------------------------------

Playing the devil's advocate. 

Do we need this ClassloaderService? All classes we load are already abstracted behind contracts like ConstraintValidatorFactory. Even the provider resolver is. The only thing is the xml resources right?

> Introduce a class loading service
> ---------------------------------
>
>                 Key: HV-582
>                 URL: https://hibernate.onjira.com/browse/HV-582
>             Project: Hibernate Validator
>          Issue Type: New Feature
>          Components: engine
>    Affects Versions: 4.3.0.CR1
>            Reporter: Hardy Ferentschik
>              Labels: class, loading
>             Fix For: 5.x
>
>
> Currently all class loading in HV happens vi the _LoadClass_ _PrivilegedAction_. In the implementation we first check the thread context class loader and then the current class loader (unless we are loading own package classes in which case we use the current class loader). Historically that was a good approach, but in order to allow for customization in all sorts of environments it makes sense to have a way to configure the class loading approach. This could be done via a _ClassLoaderService_ which can for example be set via the _Configuration_. 
> Depending on which way Bean Validation goes this could be a HV specific feature or something defined by the spec.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list