|
|
|
|
|
|
{{org.hibernate.internal.util.ClassLoaderHelper}} is a hack around previous versions of Hibernate and its reliance on TCCL. It only has effect in OSGi environments. However it also caused a very bad design decision in hibernate-osgi in terms of the scoping of the OsgiClassLoaderService. That needs to be removed.
As it is done, it basically builds one ClassLoader for every OSGi deployment using our services. So if you deploy more than one bundle into an OSGi container and requesting persistence services from Hibernate they will all share the same ClassLoader made up of each other.
Tasks here include: # Removing {{ClassLoaderHelper}} # Removing its use from {{ReflectHelper}} # Deprecate/remove the methods on {{ReflectHelper}} dealing with class loading # Adjust all uses of {{ReflectHelper}} methods loading classes to use {{ClassLoaderService}} (or more ideally {{ClassLoaderAccess}}). Essentially this boils down giving {{AnnotationBinder}} access to {{MetadataBuildingContext}} and passing that {{MetadataBuildingContext}} along to {{org.hibernate.mapping}} model classes as we instantiate them. {{AnnotationBinder}} is currently fully static (all static methods), so this has 2 flavors: ## Add {{MetadataBuildingContext}} as a static var to {{AnnotationBinder}} ## Make {{AnnotationBinder}} no longer static and add {{MetadataBuildingContext}} as an inst var.
|
|
|
|
|
|