You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LocalSessionFactoryBean (hibernate5) does not correctly pass custom ClassLoader to Hibernate [SPR-13879] #18452
But if you check the usages of AvailableSettings.CLASSLOADERS in Hibernate 5 you will find that it is only used by the legacy and unused method fromConfigSettings() in ClassLoaderServiceImpl. Therefore I believe this code effectively does nothing.
I believe that LocalSessionFactoryBuilder should actually pass the ClassLoader to the parent Hibernate Configuration constructor using something like this:
The irony is that AvailableSettings.CLASSLOADERS is new in 5.0... What exactly is that setting good for if it doesn't work for such purposes??
We can do the applyClassLoader thing, of course; thanks for pointing that out. It's just a little unfortunate with respect to the lifecycle of a given MetadataSources object which we accept as of 4.3 now...
Activity
spring-projects-issues commentedon Jan 25, 2016
Juergen Hoeller commented
The irony is that
AvailableSettings.CLASSLOADERSis new in 5.0... What exactly is that setting good for if it doesn't work for such purposes??We can do the
applyClassLoaderthing, of course; thanks for pointing that out. It's just a little unfortunate with respect to the lifecycle of a givenMetadataSourcesobject which we accept as of 4.3 now...Juergen