Re: [osgi-dev] Obtain a bundle's "state change" lock

2019-03-01 Thread Neil Bartlett via osgi-dev
On Fri, 1 Mar 2019 at 14:28, Michael Lipp wrote: > > Have you tried using a BundleTracker? > > It doesn't give you internal access to the Framework's locks... nothing > does I believe (and hope!). > > In a way, it does. BundleTracker.Tracked implements > SynchronousBundleListener. An instance of

Re: [osgi-dev] Obtain a bundle's "state change" lock

2019-03-01 Thread Michael Lipp via osgi-dev
> Have you tried using a BundleTracker? > > It doesn't give you internal access to the Framework's locks... > nothing does I believe (and hope!). In a way, it does. BundleTracker.Tracked implements SynchronousBundleListener. An instance of Tracked holds a lock on itself during the processing of

Re: [osgi-dev] Obtain a bundle's "state change" lock

2019-03-01 Thread Neil Bartlett via osgi-dev
Have you tried using a BundleTracker? It doesn't give you internal access to the Framework's locks... nothing does I believe (and hope!). It does however handle the complexity of getting current state and listening at the same time. When you open the tracker, the addingBundle() method (which you

[osgi-dev] Obtain a bundle's "state change" lock

2019-03-01 Thread Michael Lipp via osgi-dev
Hi, I just want to make sure: there's no method for obtaining the "state change" lock on a Bundle, right? I'm asking because I want an action to be performed once the bundle has reached a particular state. Without this lock I have to follow the usual procedure for such cases: * Check for target