Hi there!

Here's a short explanation, how my program is working:

Inside my program I using a FrameworkHandler class to control a pool of OSGi
instances, which represents vehicles of a traffic simulation, For every
instances I using three BundleHandler ( system, user, application) to
install / uninstall / start / stop a list of bundles. When the program is
started the pool is initialized and all system (OSGi services, Shell ..) and
user (my services) bundles are installed and started. Everytime (if there is
a free instance) there is a new vehicle, my program binds it to an instance
of the pool and installs / started an application, which should be running
on this vehicle using the application bundle handler. If the vehicles leaves
the scenario, the program resets the application by stopping, uninstalled
and reinstalling the corresponding bundles. Afterwards a new vehicle can be
bound the same instance.

My problem is that currently my program seems to hang into a loop, when the
application bundle is started after it was reset. By doing some printouts I
know that the problem occurs into that code block:

            // start bundle
            try
            {
                bundle.start();
            }
            catch (BundleException e)
            {
                System.out.println("error: could not start bundle " +
bundle.getBundleId());
                System.out.println(e);
                System.exit(1);
            }

I'm not sure what really happens, because there is no bundle exception,
although the error occurs inside the call of the start method. Isn't it
possible to "reset" an OSGi bundle?

Because I though that my problem might be a bug of the framework i already
upgraded my program to the new felix version 2.0.0, but the problem still
appears ...

BR,

Markus

Reply via email to