users@glassfish.java.net

Re: _at_Model versus _at_Named versus _at_ManagedBean

From: <glassfish_at_javadesktop.org>
Date: Sat, 11 Sep 2010 09:34:49 PDT

> I hope this helps,

This does help. I am using your book BTW. Excellent.

What is very confusing for a noob like me is that you have a number of specifications and projects all evolving on their own tracks and loosely coupled. Nowhere is it explained (at least that I can find) what specifications are dependent on what other specifications, and the roles of each. You just sort of have to be born to it -- watch it in progress.

So I can understand why your book does not mention CDI. At the time it was written I don't think that specification was widely enough implemented. But if you were going to do another edition, would you advise reliance on EE annotations for your JSF 2 backing beans and JPA beans?

From the answers here I gather the "JSF 2 answer" is to use @ManagedBean, and the "GlassFish 3-and-beyond answer" is to use @Model. I am not sure why I would use @Named instead and although I would like to know it is something I can ignore for now.
[Message sent by forum member 'alan94539']

http://forums.java.net/jive/thread.jspa?messageID=482415