[hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-1060) ClassLoaderHelper should not look only in the current thread context classloader

Emmanuel Bernard (JIRA) noreply at atlassian.com
Fri Mar 9 11:50:48 EST 2012


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

Emmanuel Bernard commented on HSEARCH-1060:
-------------------------------------------

from the classloading guide

{quote}If you expect portability between different classloading environments, it is always wrong for a framework to load it's classes from the TCCL. Instead use the right classloader, which is most often the defining classloader. If the defining classloader is not the right classloader, then look for a way to get the right loader and use it to load classes. Even if you have an inheritance model with a heirarchy that sees the classes you want, it is always more correct to pick the classloader that "owns" the classes.{quote}

So is the defining classloader right in my case (ie this.getClass().getClassLaodeR()? I want to load actual app entities I suspect.

> ClassLoaderHelper should not look only in the current thread context classloader
> --------------------------------------------------------------------------------
>
>                 Key: HSEARCH-1060
>                 URL: https://hibernate.onjira.com/browse/HSEARCH-1060
>             Project: Hibernate Search
>          Issue Type: Bug
>          Components: engine
>            Reporter: Sanne Grinovero
>            Priority: Critical
>             Fix For: 4.1.0.Final
>
>


--
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