> One thing is for sure, we do not have to all agree on and use a single > main...it is perfectly reasonable to have different mains for different > purposes.
As Marcel indicated I am working on a small set of APIs that should help making your own "Main" easier. The API provides abstractions for Launchers and FrameworkContexts. Launchers capture knowledge on how to start a particular framework implementation. I currently have implementations for Felix, Equinox and Knopflerfish 2. FrameworkContext provide a way to interact with specific environments that an OSGi framework might live in. I current have implementations for regular Java applications, JNLP/WebStart applications, services/daemons (based on Apache Daemon) and servlets (i.e. run the framework within a Servlet container and make that servlet container available as HttpService to the framework). I'm currently busy cleaning up the documentation, so expect a release soonish. The API is currently based on the assumption that a single management-type bundle will control the actual application(s) to be ran on the framework, but this could be extended in the future. Cheers, Herko ter Horst