I've been trying to figure out how to manage the startup of our application bundles (~25). There are some dependencies between bundles and we can get them running by deploying them (using asadmin -type=osgi) in the order we want. Everything runs fine, except when we restart the framework (we're using Glassfish 3.0.1 which has Felix 2.0.2). It doesn't seem to happen all the time, but occasionally we get severe startup errors.
I attempted to install a startup manager, by using the StartLevel service and a BundleListener. When one of my bundles was installed, I would set the startlevel. That appeared to work on the initial deployment. When the bundles were examined through the Felix Web Console, they showed the correct Start Level (3). However, when the framework was restarted, the bundles reverted to the default Start Level (1). It seemed that either they were started up prior to my Manager (which was at Start Level 1), or they weren't triggering an INSTALL event, just a STARTUP event, since they were already deployed. I noticed that one of the bundles that I started by dropping in the autostart/bundles directory did retain the Start Level, since that is recorded in the bundle's cache directory, but it looks like the bundles that are started via 'asadmin deploy' behave differently. Has anyone had any luck developing their own Startup Manager? Thanks, Larry

