My use case is as follows:
I need to know when all of my 200+ osgi bundles have been started. According to the old tomes of forbidden knowledge, the FrameworkEvent.Started can be used for this purpose. Unfortunately, in JBoss AS7 the framework initially starts with very few bundles - system.bundle and everything listed as an osgi capability in the subsystem. The rest if the bundles are installed AFTER the FrameworkEvent.Started is fired, even though they were deployed before that (I deployed them via the CLI, then restarted the server). This is quite strange - every time the server starts, it says:
[Server:server-one] 10:25:01,734 INFO [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-2) Install bundle: somebundle
Does this mean that the state of the framework is not persistent and it's meaningless trying to set startLevels since they will be lost on a restart? Also, can I force JBoss to install/resolve/start every bundle before the framework has officially started?
If not possible, can you give me a hint how can I know that all of the bundles have started? Creating a BundleListener and counting the bundle-started event doesn't seem like a good idea...
|Retrieving data ...|