RE: Safe to retain references to OSGi bundles?

2013-04-18 Thread Robert Munteanu
> >>> ...The reason I need to hold on to the bundle is to load classes > >>> using that its classloader at a later point in time... > >> > >> Can't you do that using getClass().getClassLoader() on a class that's > >> inside that bundle? > >> > >> I *think* keeping references to Bundle objects is fi

Re: Safe to retain references to OSGi bundles?

2013-04-18 Thread Marcel Offermans
On Apr 18, 2013, at 16:00 , Robert Munteanu wrote: >>> ...The reason I need to hold on to the bundle is to load classes using >>> that its classloader at a later point in time... >> >> Can't you do that using getClass().getClassLoader() on a class that's inside >> that bundle? >> >> I *think* k

RE: Safe to retain references to OSGi bundles?

2013-04-18 Thread Robert Munteanu
> > ...The reason I need to hold on to the bundle is to load classes using > > that its classloader at a later point in time... > > Can't you do that using getClass().getClassLoader() on a class that's inside > that bundle? > > I *think* keeping references to Bundle objects is fine if you track t

Re: Safe to retain references to OSGi bundles?

2013-04-18 Thread Bertrand Delacretaz
On Thu, Apr 18, 2013 at 3:24 PM, Robert Munteanu wrote: > ...The reason I need to hold on to the bundle is to load classes using that > its classloader > at a later point in time... Can't you do that using getClass().getClassLoader() on a class that's inside that bundle? I *think* keeping refer