Re: JSR311: Support for OSGi Service Platform

From: Bill Burke <>
Date: Wed, 13 Aug 2008 08:24:59 -0400

Tobias Hofer wrote:
> Well, I agree that OSGi is not a user-friendly framework in the sense
> that most
> popular libraries and frameworks do not work on it. But I do not agree
> that there
> are tons of component models because all of them you listed do not
> fulfill the
> criteria for what a software component shall be.
> Some of the criteria that Clemens Szyperski and David Messerschmitt give
> for
> what a component in a component model must fulfill are
> - Encapsulated
> - A unit of independent deployment and versioning
> - etc.
> There exist three more criteria, but that two are the most interesting
> for now.

I don't want to argue about what is and what isn't a component, but
Seam, Web Beans, EJB, etc... do meet the above definition.

> Unfortunately does IMHO the JAX-RS API not fullfill the criteria to work
> in a
> component model because of the RuntimeDelegate class.

Not necessarily true. It is possible though to have a RuntimeDelegate
per bundle. You could use Classloader as a key to find the particular
instance or push/pop this instance value within a ThreadLocal.

> It would be nice to
> see a growing number of libraries and frameworks that can be used without
> pain in a real component model. Would JAX-RS be one of them?

I see JAX-RS as a compliment/extension to existing component models (Web
Beans, Seam, etc...). JAX-RS should be dispatching HTTP requests, not
doing dependency injection, transaction boundaries, etc...

> Now, I don't wont that this discussion will end up in a dispute about
> what a
> component model is. There exist a common usage of that term that does not
> match the point of view mentioned. But I think that component
> encapsulation
> and independent deployment and versioning of components really are
> desirable because that makes it easier to produce stronger applications.

As a side note, you talk about this like it doesn't already exist
(independent deployment and versioning of components). independent
deployment, hot deployment, versioning, and isolation already currently
exists in most application servers. Yes, versioning is weak, you have
to define an isolated deployment with all the versioned jars you need.
But it works.

This is why I don't see OSGi as very revolutionary for the end user. I
see it more as something to benefit framework developers and middleware
providers. To give us a common kernel to deploy on so we can mix and
match each other's software.


Bill Burke
JBoss, a division of Red Hat