From [ https://github.com/hibernate/hibernate-orm/pull/491 ] :
{quote} The way the current OSGiClassLoader works isn't ideal because there is one shared instance for the whole framework, rather than one per persistence unit, meaning that class name collisions between bundles are still a potential problem, however the new implementation is much more selective about what it searches for than it used to be so this situation is far less likely to occur. {quote}
In 4.2, this isn't possible -- too much of ORM relies on TCCL and had to be "corrected" with static variable bandaids. Creating one specific classloader per persistence unit will most likely require the separation provided by 5.0. Initially marking that as a target release, although this could be researched in 4.3 as well.
|