So I take you startup the server and all X bundles get started.
Then you stop some of the bundles? And you do this using the shell?
And then you stop the server, how do you stop the server?
And when you start the server again, then all X bundles is started (eg the ones you had stopped are started).
Yes, that is correct.
When the server is running, I log on via the shell and stop the bundles using osgi:stop <bundleId>
When the server starts, all of the bundles are Active under State. And are blank under Spring (like tnk mentions in this thread)
Checking the log, I can see which bundles have started correctly and which ones have failed (even though they all should be stopped).
If I stop these bundles, they return to Resolved under State. And starting them, they display the correct Started/Failed under Spring
(I purposely have a failing bundle to test these scenarios)
Edited by: davedave on Aug 2, 2011 12:00 AM
How did you start the bundles?
Are you using the features:install?
The bundles were installed by dropping the jar file in to the deploy directory.
I use osgi:start <bundleId> to start the bundle, after I have stopped it.
After stopping the bundle, the cache directory seems to be correct, with the contents of
data/cache/bundle266/bundle.state being installed and
data/cache/bundle266/bundle.startlevel being 60
Stopping the server via bin/stop, these files contain the same values
When I start the server via bin/start, the bundle.state now contains the value starting, and tailing the logs, I can see the bundle is actually running.