I suppose we could just inspect each bundle as it becomes active for the packages as well. -Nick From: Nick Baker Sent: Thursday, December 11, 2014 7:31 PM To: [email protected]; [email protected] Reply To: [email protected] Subject: Re: How to execute code after bundles started by Felix FileInstall?
I was thinking about our use-case today. We know the full Class name of the components supplied by the bundles. We could perhaps leverage an OBR to find the bundle symbolic name for the package and leverage that in a bundle listener to execute as soon as it's available. This would be a good adjunct tomorrow he current loop/sleep/timeout, not a replacement. Of course there's no guarantee that the actual bundle will be correctly reported by the OBR, but it would be an improvement -Nick Sent from my BlackBerry. I am AFK at the moment From: Achim Nierbeck Sent: Thursday, December 11, 2014 7:06 PM To: [email protected] Reply To: [email protected] Subject: Re: How to execute code after bundles started by Felix FileInstall? Well FileInstaller sets the right startlevel, but this will be just used in case you restart the server where those bundles are already installed and inside the cache. regards, Achim 2014-12-12 1:02 GMT+01:00 thully <[email protected]<mailto:[email protected]>>: The issue is that this is not a server - this is a client application. Our command scripts work essentially like any other script, but can include commands that reference either core bundles or non-core bundles (i.e. those loaded by FileInstall). We do not control the non-core bundles - these are created by third-party developers. If the user specifies a command script to run (i.e. using a command line argument specifying a file), we want to run that script, but we want to wait until all core and non-core bundles have started up and run all commands sequentially. When a specified command is not registered with our handler, we throw up an error and stop execution. Anyway, it does seem like enabling FileInstall's felix.fileinstall.noInitialDelay to true makes the bundles load (but not start) before anything in the features.xml loads or starts. However, for some reason, it doesn't seem that felix.fileinstall.start.level is respected - it will set the start level for the bundles to that value, but they are still getting started at the very end. It seems FileInstall doesn't respect start level order in the same way that Karaf (or at least 3.0+) does with the features.xml. Does anyone know how exactly this is supposed to work in the context of Karaf 3.x? It seems the FileInstall documentation is fairly sparse... -- View this message in context: http://karaf.922171.n3.nabble.com/How-to-execute-code-after-bundles-started-by-Felix-FileInstall-tp4037120p4037173.html Sent from the Karaf - User mailing list archive at Nabble.com. -- Apache Member Apache Karaf <http://karaf.apache.org/> Committer & PMC OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead blog <http://notizblog.nierbeck.de/> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> Software Architect / Project Manager / Scrum Master
