[jsr-314-open] getting behind CDI

Dan Allen dan.j.allen at gmail.com
Wed Dec 23 15:20:30 EST 2009


On Wed, Dec 23, 2009 at 3:13 PM, Jeremy Grelle <
Jeremy.Grelle at springsource.com> wrote:

> Ahh, I see...I made the mistake of assuming that CDI was already exposing
> such beans via EL.  Indeed, having to resolve the bean from JNDI isn't too
> pleasant.  Looking at the spec, I see now that @Named is necessary to give a
> bean an EL name.
>
> WRT @javax.annotation.ManagedBean, Spring just uses the value as the bean
> id, rather than registering anything with JNDI,
>

Right, that makes sense, since both are what I would call the "native
internal id representation" of the bean.


> thus it becomes resolvable via EL as long as you register the provided
> SpringBeanELResolver.
>

Got it. So in a sense this is like the ManagedBeanELResolver I proposed,
except that looking up in JNDI is not as straightforward as looking up a
Spring bean id.


>
> Agreed, then, since we do support the use of @Named at the class level in
> Spring, it makes sense to settle on it for the sake of more consistent
> examples.
>

Excellent. There you have it, folks ;)

-Dan

-- 
Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597

http://mojavelinux.com
http://mojavelinux.com/seaminaction
http://www.google.com/profiles/dan.j.allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jsr-314-open-mirror/attachments/20091223/ec2601f6/attachment.html 


More information about the jsr-314-open-mirror mailing list