Re: JSR311: Support for OSGi Service Platform

From: Dhanji R. Prasanna <>
Date: Wed, 13 Aug 2008 22:26:11 +1000

On Wed, Aug 13, 2008 at 6:30 AM, Bill Burke <> wrote:


>> One of them is the lack of a root resource service interface. I suggest
>>>> to introduce an empty interface named '' or
>>>> alike. This interface would allow an OSGi bundle to expose its resources
>>>> using the OSGi service registry using interface that is part of the
>>>> official API.
>>>> I don't think an OSGi bundled JAX-RS application *needs* to export any
>>> classes. I also don't think an OSGI service registry is appropriate for
>>> JAX-RS components.
>> Exactly right. There's no need to export any classes. But the bundle
>> must provide information about the services it provides. That
>> information is used by the framework to wire bundles and their
>> components together.
> The problem is, again, there are different popular component architectures
> out there. The main ones being Spring, EJB 3, Seam, and maybe even Guice.

Yea, exactly. I recall our discussions early in the life of this EG where
Larry Cable & I argued strongly in favor of deliberately *not* creating a
custom component model for JaxRs. Rather for taking an agnostic approach,
especially because of Guice (on my side) and Spring (I imagine, on

Which, the spec leads also agreed with (we removed some of the
scoping/lifecycle constructs at that time).