|
My point is that, in OSGi, each EMF/SF is bootstrapped using an instance of OsgiClassLoader. That CL has a limited scope: the hibernate-core/hibernate-entitymanager/hibernate-osgi bundles and the "requestingBundle" (the client bundle requesting the EMF/SF). If a single, running instance of the Hibernate bundle(s) bootstraps an EMF for multiple client bundles (multiple persistence units), sharing data between the EMFs/SFs can have bad consequences w/ respect to the limited CL scoping. At least in this environment, it's vital to isolate each of them.
I'm not saying that this feature shouldn't be implemented. But, it should (in the very least) be configurable and disabled by default.
|