[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] receiving a FrameworkEvent.STARTED event?

Hello all,

I'm facing a problem and would like to ask for some information.

I have a bundle whose activator is registering a FrameworkListener inside the start() method. This bundle is set to start at level 3.

frameworkListener = new FrameworkListener() {
ÂÂÂÂÂÂÂÂÂÂÂ public void frameworkEvent(FrameworkEvent event) {
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ if (event.getType() == FrameworkEvent.STARTED) {
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ try {
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ initiateProcess();
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ } catch (Exception e) {
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ logger.error("Failure occurred while executing "
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ + "initial process.");
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ }
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ }
ÂÂÂÂÂÂÂÂÂÂÂ }
pBundleContext.addFrameworkListener(frameworkListener);

When executing that bundle with a OSGi Framework launcher then the unique event being captured is STARTLEVEL_CHANGED. I can't find a way to it to also receive a FrameworkEvent.STARTED.

And I'm not also receiving the FrameworkEvent.STOP after type a close command and leave the session.

Please, could someone explain me what am I missing here?

thanks,

Cristiano