Am 08.04.15 um 10:24 schrieb Chetan Mehrotra: > On Tue, Apr 7, 2015 at 8:25 PM, <[email protected]> wrote: > >> + final ServiceReference slRef = >> bundle.getBundleContext().getServiceReference(StartLevel.class.getName()); >> + final StartLevel sl = (StartLevel) >> bundle.getBundleContext().getService(slRef); >> + message = "FrameworkEvent STARTLEVEL CHANGED to " + >> sl.getStartLevel(); >> > > > Just for completeness should not we unget the service also. > If the bundle is stopped, the service is unget by the framework nevertheless. We could think about getting the start level service outside of the event handling and releasing it there.
I'll see if I can make the code look nicer Carsten -- Carsten Ziegeler Adobe Research Switzerland [email protected]
