| Ugh, good catch gents. The original use of OsgiPersistenceProviderService/OsgiSessionFactoryService was unmanaged – application bundles requesting an EMF/SF on their own, with therefore limited "requestingBundle" scope. I now see that the Aries managed JPA path grabbing only a single OsgiPersistenceProvider, and the requestingBundle being the entire container, being extremely problematic. Tim Ward, I'm leaning on you to decide the "correct" way of doing things, since Aries is our primary provider of managed JPA. I appreciate the fix of ARIES-1575. But, would we be better off in the long run with the fixes Steve suggested? Essentially, the variables in OsgiPersistenceProviderService would be moved to OsgiPersistenceProvider itself and created on-demand, one per EntityManagerFactory. Seems reasonable enough. Even with with ARIES-1575, I'm wondering if other nasty CL-related side-effects could be hiding... |