We run as a "one-jar" (standalone) and in OSGi. Is there a way to tell, at run-time, which environment (OSGi or Standalone) you are running in? A method call like isOSGi()?
You can use activator to tell if the application is deployed into OSGi platform.