First off, I need to thank the Felix developers for a great product. I've been able to integrate the Felix OSGi framework into my project with just a few days of study and experimentation.
A difficult requirement in my project involves discovery and resolution of plugin dependencies. The client application needs to be able to download a plugin (an OSGi bundle), and then figure out which other plugins it must download and install before using the first plugin. Unlike Eclipse, we'd like to rely on the Import-Package and Export-Package header rather than the more explicit but less flexible Require-Bundle. The bundlerepository bundle contains all the code to do this dependency discovery, but it's wrapped up and tangled in with the Felix shell. I spent a long time studying org.apache.felix.bundlerepository.ObrCommandImpl before I realized that much of the _deploy() method is using interfaces from the org.osgi.service.obr package. That suggests that there's supposed to be some available programmatic means to do what the OBR-related commands offer in the shell. Next I found the class org.apache.felix.mosgi.managedelements.obrprobe.ObrProbe which implements the ObrProbeMBean interface's deploy() method. This implementation looks slimmed down from ObrCommandImpl's _deploy() method; I haven't yet figured out the difference between the two, beyond using LDAP-style filters in the former. Beyond using liberal cut-and-paste, is there some prescribed way for an application embedding Felix to incorporate this kind of deploy()/_deploy() capability? Searching the Web repeatedly for discussion on this topic has only led me back to reading the source code. Follow-up question: Couldn't most of the bundlerepository bundle be teased apart from depending on the shell? -- Steven E. Harris