Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

@ManagedBean vs @Named  RSS feed

 
Ranch Hand
Posts: 32
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There seems to be ongoing discussion on which annotation should be used. What's your take on that?
 
Author
Ranch Hand
Posts: 130
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As you've said, there's been a lot of talk. It appears that pretty much everyone is suggesting @Name. The @ManagedBean (from JSF) really doesn't offer anything that @Name does not. It wouldn't surprise ms if @ManagedBean becomes deprecated in JSF2.1 in favor of CDI.
 
author
Ranch Hand
Posts: 82
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jason Porter wrote:As you've said, there's been a lot of talk. It appears that pretty much everyone is suggesting @Name. The @ManagedBean (from JSF) really doesn't offer anything that @Name does not. It wouldn't surprise ms if @ManagedBean becomes deprecated in JSF2.1 in favor of CDI.



The presence of javax.faces.bean http://java.sun.com/javaee/6/docs/api/javax/faces/bean/package-summary.html in JSF 2 is only to enable those that use JSF2 on top of a Servlet 2.5 container to still have access to the features that obviate the need for the faces-config.xml.

If you're on an EE6 container, such as Oracle Glassfish, you'll be better served by using @Named.

Ed
 
Marcin Kwiatkowski
Ranch Hand
Posts: 32
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds good. Thanks for the answer!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!