dev@jsr311.java.net

WebBeans integration (was Re: JSR311: Feedback from W-JAX presentation)

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Wed, 07 Nov 2007 10:37:55 -0500

On Nov 7, 2007, at 5:20 AM, Heiko Braun wrote:
>> - Some people were concerned about how to integrate this with their
>> existing, EJB 3-based architectures, esp. regarding the SessionBean-
>> based layer they're currently exposing as SOAP web services. I don't
>> believe there's any easy way because of the architectural differences
>
>
> It shouldn't be too hard. I think Ryan is working on that
> and I am looking at it myself. One of the things that appeared to me,
> is that we need to get rid of the ctor based injection, which the spec
> enforces on root resources. This makes it hard to leverage other
> container semantics. Furthermore we may think of allowing 311
> annotation
> on interfaces as Bill already suggested.
>
Paul and I spoke with Gavin King (spec lead of JSR 299) yesterday
about integrating JAX-RS and WebBeans. Essentially the idea is that a
JAX-RS resource class can be a WebBean and thus an EJB. There are
obviously some sticky points with such an integration, e.g. WebBeans
offers a variety of scopes that may not be appropriate to a RESTful
service and mixing JAX-RS annotated constructor parameters with
WebBeans provider parameters is difficult but I think such an
integration would give us what we need without our having to define
yet-another-component-model and mapping that onto EJB. It also offers
a nice unified model across JSF, JAX-RS and EJB.

Marc.

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.