Sign in

E-mail *, (xx@domain.com)
Password *

Register | Forgot password

Recent blogs

RSS - Blogs
March 9, 2010
State of OSGi in the Java world
March 4, 2010
Reach more people with Google Translate
March 3, 2010
Get My Advice
February 26, 2010
What? Where!?!
February 11, 2010
Split it!

All Blogs...


State of OSGi in the Java world

March 9, 2010

We have been a heavy investor, user and proponent of the open standard OSGi and modularisation in general. The disruptive transition in the Enterprise Java world from the old, monolithic thinking to the new way of thinking modular is not a smooth one though, and takes time. Last week I visited OSGi Devcon in London, so this a good opportunity to talk about the state of OSGi, and where the Java Enterprise industry is moving.

For Enterprise developers, the major news is that the first Enterprise OSGi specification is reaching finalization. Although the OSGi Enterprise Expert Group (EEG) website doesn't give much details about the specs, you can find draft v4 on the Apache Aries page, more on that project later. This draft specification also contains interesting annotations from reviewers by the way, recommended to do a quick scan of this document.

The new specification defines how several JEE specs should work in a dynamic OSGi environment. The JEE specs that are chosen are for example the JPA spec (Java Persistence API), JMX (Java Management Extensions), JDBC (Java Database Connectivity), the JTA (Java Transaction API) and JNDI (Java Naming and Directory Interface). Although the OSGi Enterprise specification doesn't cover all of the JEE APIs, it does cover the most important ones, more than enough for most Enterprise applications.

On top of the OSGi-ified JEE APIs, there are some new concepts introduced in the Enterprise OSGi specs. The most important one is the standardization of .wab files, which are OSGi versions of .war files. You need to add some descriptors, and then you can deploy those .wab files like regular OSGi bundles, including life cycle and dependency management. Regular .war files are also supported, they need to be transformed transparently and on the fly by the OSGi container to .wab files. Last year there were several vendors already experimenting with server side bundles, and using different APIs and even different file extensions (like .par and regular .jar), it's great to see a standard here.

Another new feature is remote OSGi, which enables you to use exported services from an OSGi bundle in a remote Virtual Machine. This gives new possibilities for distributed solutions, for example to solve scalability or redundancy issues. As a bundle developer you already need to develop with the possibility in mind of not available services, in effect a poor mans 'design by failure' approach, which works great in a distributed environment.

To facilitate, experiment and learn from the new specs and its uses, two projects are started: Apache Aries and Eclipse Gemini. Both projects have approximately the same goal: provide implementations of the Enterprise OSGi specifications, create examples and create a community. Apache Aries is in incubation and sponsored by IBM and SAP, Eclipse Gemini is sponsored by Oracle and SpringSource.

To top it all of, SpringSource is in the process of donating its open source OSGi container to Eclipse, and renamed it from SpringSource DM to Eclipse Virgo. This container serves as the reference implementation for the Enterprise OSGi specification. This also means that the license is moved from the restrictive GPL to a more open EPL license.

Almost all Enterprise container vendors like JBoss, Glassfish, Oracle and IBM were already building the application server on top of OSGi, but didn't expose OSGi to the enterprise application developer, or did expose it, but with proprietary APIs, therefore locking in the developer and hindering further adoption in the larger Java EE space. With the new Enterprise OSGi specification, developers can use the power of OSGi, without being locked in, which is great.

So all new specifications to get rid of vendor lock in, various implementations of these standards, open and closed source, community to work with, is this all good news then? No, sadly it's not.

Adoption from 'old' Java EE users is slow. In part because of the technical challenge: Java has been monolithic of nature from the very beginning, and adding modularization to a very stable, mature platform is hard. It will take time and determination to solve all the problems while in the mean time keeping an upgrade path for JEE users.

Another problem is that the Java industry has been taught for 15 years to think in monolithic architectures. Thinking in components and services architectures is a revolutionary, disruptive trend, which will take time and effort for those affected to learn and understand.

And the last issue is of more political nature: There is still tension between the JCP and the OSGi consortium. Both are defining standards, and are not necessarily in agreement of each others approach. With the takeover of Sun by Oracle, this might change. There is a real risk that new JEE specifications are defined without taking OSGi into account, and that would create the possibility of forking the Enterprise standards.

But even with the above remarks it's clear that modularization is on the brink of a breakthrough in Java Enterprise Development. Especially for architects, this means thinking in complete new ways about their work and responsibilities. With GX WebManager, by adopting OSGi in a very early stage we have been using these concepts for years now, but it was clear at the conference that this is not necessarily the case with mainstream Java Enterprise Developers. Kirk Knoernschild, analyst at Burton Group, gave a great presentation about modularization and OSGi, which is required reading for everyone serious about Java Enterprise Development. See it here.

About the Author

Return to all blogs

Martijn van Berkum

Martijn is chief technology officer of GX. Besides a visionairy leader of GX, Martijn participates in several international expert groups, among them the JSR-283.

Read all Martijns blog entries

Other blog entries:

March 4, 2010
Reach more people with Google Translate
July 20, 2009
How to benefit from the improved inline mode
May 29, 2009
Watch content!
May 12, 2009
Traffic and Conversion
April 17, 2009
The new Community Forum in 980
April 2, 2009
10 Years Cluetrain Manifesto
March 18, 2009
The CMS Vendor Meme
March 3, 2009
jQuery and GX WebManager
December 24, 2008
The year has almost ended...
October 22, 2008
New certification process


Share:

del.icio.us
digg
Technorati
Slashdot
Reddit
YahooMyWeb
NewsVine
ekudos
© 2010 GX creative online development B.V.

Disclaimer

This website (GXdeveloperweb.com) may discuss or contain opinions, (sample) coding, software or other information that does not include GX official interfaces, instructions or guidelines and therefore is not supported by GX. Changes made based on this information are not supported.  GX will not be held liable for any damages caused by using or misusing the information, software, instructions, code or methods suggested on this website, and anyone using these methods does so at his/her own risk. GX offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this website, including any liability resulting from incompatibility between the content of this website and the materials and services offered by GX. By using this website you will not hold, or seek to hold, GX responsible or liable with respect to the content of this website.