jboss-weld

Are @ManagedBeans obsolete in JavaEE6 because of @Named in CDI/Weld?

こ雲淡風輕ζ 提交于 2019-11-26 04:39:50
问题 Because of CDI (and its implementation Weld), every POJO in JEE6 can be annotated with @Named , which makes the POJO accessible to the view. Does that mean that ManagedBeans are completely obsolete now? Or did I miss something where @ManagedBean still makes sense? 回答1: In short, @ManagedBean makes sense for applications that use JSF but do not use JSR 299 (whatever the reason is). Below a longer explanation from Gavin King: Re: Comparisons to @ManagedBean annotations in JSF2?: While looking