16

I'm evaluating OSGi containers and the subject came up of using Glassfish to contain my OSGi application components. My question is: Is Glassfish good for this? Does anybody have any experience using it in this way?

Background: - The application is not a Java EE application, it's a Spring application. - I've been evaluating Felix + Tomcat. - I've never used Glassfish but it has some features that our operations people are interested in.

Thanks!

1
  • 1
    I've seen a presentation from Sun (at Sun's office in the Netherlands, in 2009) where they demonstrated exactly this kind of thing: GlassFish v3 with other OSGi components running in the same OSGi container, and the webapp running in Glassfish using the other OSGi components. So it's definitely possible.
    – Jesper
    Jun 30, 2010 at 7:00

5 Answers 5

8

GlassFish is IMO a serious candidate and I would definitely look at it. Some resources:

6

While Glassfish may be a good candidate for an OSGi container, it is fairly large, due to the fact that it is primarily a Java EE container. If I were writing an OSGi application, I would use Karaf/Felix as the container. Its small, OSGi specific, OSGi 4.2 compliant, in active development (bugs get fixed quickly), and has a large group of OSGi users.

3

The demo Jesper mentions uses OSGi declarative services. See this detailed blog entry GlassFish can also be installed on an existing OSGi runtime (Felix or Equinox). Current OSGi efforts are focusing on hybrid apps and the OSGI enterprise spec. It let's JPA, JDBC, HTTP and other services to be packaged as OSGi bundles.

1

Have a look at http://java.dzone.com/news/from-osgi-glassfish-5-steps

0

The fastest OSGi container is probably NetBeans' http://wiki.apidesign.org/wiki/JDeveloper

For more info see http://platform.netbeans.org/tutorials/nbm-osgi-quickstart.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.