Search code examples
osgiosgi-bundle

Can OSGi components be deployed in any Servlet containers?


Can OSGi components be deployed to any Container like Tomcat/Websphere/JBoss..etc ? (just as we deploy a WAR file) or do they require any special libraries or OSGi containers to run the OSGi components ?


Solution

  • If you want just expose the "component" classes, you can treat the jar files as .. jar files.

    If you consider the OSGi "component" as a "bundle" exposing some services and doing something, then answer is "no". You need an OSGi container (Karaf, WebSphere Liberty, Carbon, Glassfish, JBoss WildFly ...).

    However - as you can see, some application servers provide OSGi support natively.