Well the framework is just the osgi framework. You might try with start levels, to start your bundle in one of the "last" start levels
regards, Achim 2012/5/3 bobshort <[email protected]>: > We have bundles that do some intensive processing. Right now they are > starting as the framework is starting and slowing startup down considerably. > The osgi container is running on a plug computer so resources are minimal. > > I want to start my processing only after the osgi container is fully > started. I've implemented a framework listener to detect when the framework > is started and then trigger my startup logic: > > /public class EventListener implements FrameworkListener { > > @Override > public void frameworkEvent(FrameworkEvent event) { > if (event.getType() == FrameworkEvent.STARTED) { > // Do startup logic here. > } > } > }/ > > This works if my bundles are installed before the framework is started, but > it obviously does not work for modules installed after the framework is > started. > > Is there any way I can query the framework status from my bundle so I can > detect if the container is already fully started when the bundle is > installed? I'd like to do something like: > > / > public void onBundleStarted() { > if (**test if framework already running**) { > // Do startup logic here. > } > } > / > > Is this possible? > > -- > View this message in context: > http://karaf.922171.n3.nabble.com/Is-there-a-way-to-query-osgi-framework-status-e-g-started-tp3959588.html > Sent from the Karaf - User mailing list archive at Nabble.com. -- Apache Karaf <http://karaf.apache.org/> Committer & PMC OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead OPS4J Pax Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project Lead blog <http://notizblog.nierbeck.de/>
