Currently Envers still uses ReflectHelper.classForName exclusively in some places:
org/hibernate/envers/entities/EntityInstantiator.java org/hibernate/envers/entities/mapper/ComponentPropertyMapper.java org/hibernate/envers/entities/mapper/id/AbstractCompositeIdMapper.java org/hibernate/envers/entities/mapper/relation/AbstractToOneMapper.java
This behaviour hinders usage in enviroments where custom classloaders, e.g. OSGi, are required. Instead hibernate's ClassLoaderService should be used.
The attached patch fixes this issue for all located instances except for AbstractCompositeIdMapper where access to the ClassLoaderService is not as easy as in the other cases.
|