Re: [hibernate-dev] hibernate-osgi JPA bootstrap & classloader

2015-05-28 Thread Brett Meyer
> > > Is that the best way to know when TransactionManagers and DataSources > > come > > > and go too? Or is there a more specific concept for listening to an > > "OSGi > > > service"? > > > > At least for TransactionManagers, yes, the BundleListener is probably the > > best approach. I'm not awa

Re: [hibernate-dev] hibernate-osgi JPA bootstrap & classloader

2015-05-27 Thread Steve Ebersole
More I mean what bundle(s) should I listen to in order to know that the ClassLoader is no longer valid? Or how would I otherwise know that or be notified of that? I can ping Christian regarding Aries specifically and get his thoughts. On Wed, May 27, 2015 at 9:16 PM, Brett Meyer wrote: > > In

Re: [hibernate-dev] hibernate-osgi JPA bootstrap & classloader

2015-05-27 Thread Steve Ebersole
On Wed, May 27, 2015 at 9:09 PM, Brett Meyer wrote: > > Is that the best way to know when TransactionManagers and DataSources > come > > and go too? Or is there a more specific concept for listening to an > "OSGi > > service"? > > At least for TransactionManagers, yes, the BundleListener is prob

Re: [hibernate-dev] hibernate-osgi JPA bootstrap & classloader

2015-05-27 Thread Brett Meyer
> In regards to OsgiClassLoader and dynamically managing the "classpath", any > thoughts on how to handle out single call to OsgiClassLoader#addClassLoader > (from OsgiPersistenceProvider passing > the javax.persistence.spi.PersistenceUnitInfo#getClassLoader we get from > the e-OSGi container)? >

Re: [hibernate-dev] hibernate-osgi JPA bootstrap & classloader

2015-05-27 Thread Brett Meyer
> Is that the best way to know when TransactionManagers and DataSources come > and go too? Or is there a more specific concept for listening to an "OSGi > service"? At least for TransactionManagers, yes, the BundleListener is probably the best approach. I'm not aware of a more specific way beyo

Re: [hibernate-dev] hibernate-osgi JPA bootstrap & classloader

2015-05-26 Thread Steve Ebersole
In regards to OsgiClassLoader and dynamically managing the "classpath", any thoughts on how to handle out single call to OsgiClassLoader#addClassLoader (from OsgiPersistenceProvider passing the javax.persistence.spi.PersistenceUnitInfo#getClassLoader we get from the e-OSGi container)? I am not sur

Re: [hibernate-dev] hibernate-osgi JPA bootstrap & classloader

2015-05-26 Thread Steve Ebersole
I created the following 2 issues to track these improvements: https://hibernate.atlassian.net/browse/HHH-9818 https://hibernate.atlassian.net/browse/HHH-9819 On Tue, May 26, 2015 at 3:57 PM, Steve Ebersole wrote: > Awesome, thanks! So I'll investigate BundleListener... > > Is that the best w

Re: [hibernate-dev] hibernate-osgi JPA bootstrap & classloader

2015-05-26 Thread Steve Ebersole
Awesome, thanks! So I'll investigate BundleListener... Is that the best way to know when TransactionManagers and DataSources come and go too? Or is there a more specific concept for listening to an "OSGi service"? Also, do the containers generally handle "in-flight" requests in regards to Trans

Re: [hibernate-dev] hibernate-osgi JPA bootstrap & classloader

2015-05-26 Thread Brett Meyer
> I would fully expect hibernate-osgi to not directly use Bootstrap to build > an EntityManagerFactoryBuilder. Bootstrap is geared toward users wanting > to leverage 2-phase JPA bootstrapping, not our components. I would have > expected Enterprise OSGi support to instead directly build (and possi

Re: [hibernate-dev] hibernate-osgi JPA bootstrap & classloader

2015-05-26 Thread Steve Ebersole
I would fully expect hibernate-osgi to not directly use Bootstrap to build an EntityManagerFactoryBuilder. Bootstrap is geared toward users wanting to leverage 2-phase JPA bootstrapping, not our components. I would have expected Enterprise OSGi support to instead directly build (and possibly over

Re: [hibernate-dev] hibernate-osgi JPA bootstrap & classloader

2015-05-26 Thread Brett Meyer
IIRC: OsgiPersistenceProvider and OsgiSessionFactoryService both need *some* way to build the OsgiClassLoader and pass it into Hibernate bootstrapping. For the SF, that's easy: just hand OSGiClassLoaderServiceImpl to BootstrapServiceRegistryBuilder. For EMF, it looks like I mistakenly overrod