RE: Re: API feedback

From: Larry Cable <>
Date: Thu, 12 Jul 2007 12:19:24 -0700

perhaps a revision of the JavaBeans specification is called for to define a common IoC model for Java?
- Larry


From: Dhanji R. Prasanna []
Sent: Thu 7/12/2007 12:17 PM
Subject: Re: API feedback

On 7/13/07, Marc Hadley <> wrote:

        On Jul 11, 2007, at 6:37 PM, Dhanji R. Prasanna wrote:
> This is something I brought up very early on but would tend to
> discourage as we cannot provide a coherent implementation of
> @Resource without confusing the hell out of developers working in
> SE environments or (future) EE profiles that are not of the
> "kitchen sink" ilk.
> It may be worthwhile to support it as an "also possible" in certain
> EE profiles (enabled with jndi registries).
        I note that @Resource is included in SE 6, is your concern that
        @Resource will only work with certain types in certain contexts/
        profiles ? If so I think we can counter that problem by being very
        clear about what is guaranteed to work where.

Yea this is essentially it. Right now any servlet container without jndi cannot do justice to @Resource.
I imagine this will iron itself out as the various other JSRs struggle with IoC too.

> - Resource injection needs to happen in one place. JAX-RS, Servlet,
> JSF, JAX-WS, WebBeans, Persistence, EJB, ... all perform resource
> injection and its possible to mix annotations from multiple
> technologies in a single class. It would be useful to have some
> common infrastructure across EE for performing the injection, perhaps
> coupled with infrastructure for instance creation and management.
> Aha! This is what Ive been trying to say, somewhat less than
> eloquently (apparently!) in other threads of late. I think this
> needs careful consideration and leadership from either JSF2 and Web
> beans as their IoC concerns will be the most robust and wide-
> ranging. We would also need careful coordination with the Umbrella
> EE JSR to make everything happen.
        FWIW, I think JAX-RS has the same need for robust and wide-ranging
        IoC. The key thing (IMO) is to have some consistency across the
        platform specs. E.g. it seems reasonable for a JAX-RS resource class
        to be able to benefit from injection of Java persistence artifacts,
        EJB references etc.

Well, I meant that the driver for IoC is much stronger and more wide-ranging in Web Beans and JSF2 (Conversation scopes, 2-way injection, staged lifecycle etc.). I agree, however, that we ought to play on the same field.

        Sounds good, perhaps around the time we publish an early review
        draft. That would be a good opportunity to get feedback.

Good stuff.


Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.