Category Archives: General

General blog’s about nothing special

Jigsaw & OSGi – Modularity in Java

Recently I read this article about the current status of modularity in Java. Discussing modularity in Java with collegues turns out to be funny quite often. OSGi (as the really only reliable modularity framework available) has really some difficulties when it comes to JEE integration, building or 3rd party library integration (classloading-hell to be exact…). These drawbacks seem to somehow reflect to the modularity concept in general – at least for Java.

So I must say that I am really ancious about the 3rd attemp to finally make modularity a 1st class citizen of Java. I can’t wait to get the first EA of Java 9 supporting the Jigsaw features to see how it looks like!

For anyone who is interested, have a look at the quickstart. Though the current JDK 9 build is lacking the Jigsaw features, you can get a glimpse of the concept.

Bundles & Libraries

I heard a talk about VIB – Very Important Bundles – today at the W-JAX here in Munich. The speaker pointed out some key features and services (and available solutions) necessary for developing applications in an enterprise context. He also discussed the way bundles should be designed in general. There were two mentioned aspects that made me wonder.

  • Bundles represent a deployment artefact only.
  • Bundles may contain libraries they need, if it is applicable.

For me, a bundle is explicitly not only a deployment artefact. Bundles represent a software component and are therefor an architectual element of the software. They are essential to be able to use public and private API, as Java Packages simply do not serve this need. No need to say that I prefer ‘Required Bundles’ instead of ‘Imported Packages’ :). And turning to libraries, they should be encapsulated in a separate bundle and definetly not included in any bundle containing business code. A big advantage is the reusability of these individual so called ‘library bundles’, for instance logging frameworks or apache commons components. From my point of view, intergrating libraries in a bundle and even exporting them makes their management difficulter than necessary, at least within an enterprise context.