Let me try to explain this again. I call addFrameworkListener to add a listener to the system bundle context.
One of my bundle's activators throws. That listener gets called, but it gets called in the FelixDispatchQueue thread. I have a method that calls bundleContext.getServiceReferences(); this is what triggers the call to the activator that gets the exception. In that method, I want to capture the Cause from the FrameworkEvent. So I need to wait for FelixDispatchQueue to get around to calling the listener. Is there a way? On Mon, Dec 8, 2014 at 9:41 AM, Felix Meschberger <fmesc...@adobe.com> wrote: > Hi > > I am sorry, I have no clue, what you are asking for :-) > > >> Am 08.12.2014 um 15:35 schrieb Benson Margulies <ben...@basistech.com>: >> >> So, I've got a problem here with queued events. > > Are you talking about EventAdmin ? > >> >> If I call bundleContext.getServiceReferences() and then dereference >> the reference, the activator gets called. > > What activator ? If the service happens to be a ServiceFactory, the > getService(Bundle, ServiceReference) method is called. If the service factory > happens to be implemented as a Declarative Services component, then yes, the > activator method is probably called, which may indeed throw. > >> If that results in a throw, >> the resulting event gets queued, and is delivered, eventually. So, I >> bet that there is some call I can make to 'drain the queue' and ensure >> that events are delivered. Can you tell me what I do to wait for all >> such events to be delivered, so I can resynchronize? > > This is actually where you loose me completely … > > Regards > Felix > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org >> For additional commands, e-mail: users-h...@felix.apache.org >> > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@felix.apache.org For additional commands, e-mail: users-h...@felix.apache.org