Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

OSGI its own container?

 
Don Scott
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OSGI runs in its own container correct? What are the performance impacts of running this container inside of an existing container such as a web or ejb container? For example, if you profile the class running on the jvm-how small is the footprint?
 
Augusto Sellhorn
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don Scott wrote:OSGI runs in its own container correct? What are the performance impacts of running this container inside of an existing container such as a web or ejb container? For example, if you profile the class running on the jvm-how small is the footprint?


I've done this the other way around. You can run an OSGi container and have a web container bundle (like jetty) and run your web apps inside. For EJB component it is more complicated, I don't think it would be trivial to try to bolt a whole OSGi runtime inside of JBoss (in those cases I've used Spring inside). However, a lot of the app servers are being implemented via an OSGi runtime so this is more of a possibility.
 
Karl Pauls
author
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Running a OSGi framework inside other containers is doable (but as others have noted some are easier than others - eg. servlets easy, ejb tricky). The footprint of for example Apache Felix is about 500K (both on disk as well as in memory) so typically no problem for a server side application.


As mentioned already, more and more, there are possibilities to use OSGi out-of-the-box inside JEE containers (JOnAS has very good support but, Glassfish, JBoss, and Websphere make it possible one way or the other by now as well).
 
Don Scott
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the replies! OSGI is still really new to me, so I wasn't even familiar with the idea about the OSGI container holding the web container. I haven't ever looked at JOnAS-but will have to research it.

Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic