This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Micro Frontends in Action and have Michael Geers on-line!
See this thread for details.
Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

is OSGi mature enough yet?

Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kirk,

Your book sounds interesting.

I just happen to have started using OSGi by trying to deploy an existing application that is designed for web application servers and am having a lot of trouble with dependencies and class loaders.

Reading some of your introduction, it seems as though some of my problems are because my application is not designed in a modular fashion: I guess I need to pay more attention to the physical design.

But if the theory is valid and useful right now, it seems to me as though the tools and containers I am using are not very robust, some may say flaky (I am using Karaf/ServiceMix 4.4).

What are your thoughts on this, are the tools mature enough for modular JAVA? Or should we wait for java 8 or maybe 9 to avoid the early adopter struggle?

Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe you should be designing modular software right now. Whether you decide to use a modularity framework like OSGi is a separate decision and is driven by your willingness to deal with some of the challenges. By designing modular software now, you're positioned to take advantage of runtime support for modularity when you're ready.

OSGi is a very mature technology. What's still relatively immature is that the app server vendors have only been working to incorporate OSGi into the app platforms for the past couple of years. Depending on which app server you're using, you may find it's more or less mature. Tooling for the enterprise developer is also maturing.

Dependencies and classloader errors are common for folks new to OSGi because the way OSGi handles these things is a bit different than what we're accustomed to. For instance, if your code uses Class.forName in an OSGi environment, you're likely to have problems. Read this post by Neil Bartlett as an example. OSGi itself is mature enough, but there are some anti-patterns we have to avoid.

Visit the book's website at where you can review all 18 patterns and download an excerpt of the book. There is also a mobile web application available that you can take with you wherever you go.

Twitter: @pragkirk
kato Kwong
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the links Kirk.

Talking about the relative maturity of OSGi and application server vendor OSGi support, there is also the OSGi readiness of 3rd party frameworks to consider.

Being aware of the different class loading paradigm so as to avoid coding pitfalls in my own code is one thing. Another is using 3rd party frameworks such as Hibernate.

Is there any virtue in the OSGi specification being mature if container and framework support is not? I guess this is an evolution...

As you say, by making my code more modular I may resolve some of my issues, but at least I can be satisfied that I will have written a better application
Friends help you move. Good friends help you move bodies. This tiny ad will help:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic