ClassLoaderServ

Recently I need to add a custom classloader to Hibernate (I am using 5.2).
I tried to extend org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl but not getting any way to register my classloader so that it can be looked by Hibernate .

I tried to use the following:

BootstrapServiceRegistryBuilder bootstrapRegistryBuilder =
new BootstrapServiceRegistryBuilder();
// add a custom ClassLoader
bootstrapRegistryBuilder.applyClassLoader( customClassLoader );

but it doesn’t work.

I although am able to use an integrator just by packaging META-INF/services/org.hibernate.integrator.spi.Integrator, is there anyway to do the same for org.hibernate.boot.registry.classloading.spi.ClassLoaderService

What exactly does not work? Try to debug it an see why it does not work.

Also, check these properties too:

http://docs.jboss.org/hibernate/orm/5.2/userguide/html_single/Hibernate_User_Guide.html#configurations-misc