Howard, there is nothing against ViewScoped/ViewAccessScoped. But many data in ViewScoped/ViewAccessScoped leads to high memory usage, so it's better to use RequestScoped if possible.
2012/11/21 Howard W. Smith, Jr. <smithh032...@gmail.com> > I'd like to take time to thank you all that helped me migrate from > Glassfish 3.1.2.2 and JSF Managed beans to TomEE and CDI managed beans. I > think the migration is complete. I am in regression testing phase/mode now. > :) > > Special shout out to Thomas Andraschko, as his inputs in PrimeFaces forums > and blogs, lead/motivated me to migrate from Mojarra 2.1.7 to MyFaces Core > 2.1.8 for fast (AJAX) rendering performance, and then he even recommended > MyFaces Core, OpenWebBeans, JUEL for huge performance gains, and even > today, he encouraged me to consider Batoo JPA, and because of that, > TomEE/OpenEJB and Batoo JPA are now discussing integration! :) > > Anyway, Jose, here, recommended CODI @ViewAccessScoped. I think Thomas and > some other expert users in PrimeFaces Core forum recommended @RequestScoped > as much as possible throughout app, and recommended against JSF @ViewScoped > as well as CODI @ViewAccessScoped (I hope I'm not misquoting them...smile). > > Honestly, I have no CDI @RequestScoped beans in my app; I need to take time > to move some of my code from CDI @SessionScoped to CDI @RequestScoped. > Also, due to issues I experienced injecting EJBs inside of @FacesConverter > (which were added to CDI @SessionScoped beans) caused me to move all my > @FacesConverter classes to JSF @RequestScoped beans; that seems to be > working great, but Mark and Gerhard has already recommended CODI > @Advanced/etc... to inject beans in @FacesConverter classes. I need to give > them a try even though I spent hours moving @FacesConverter classes from > CDI beans to JSF Managed beans...during this migration to CDI. > > So, please advise on whether I should use @ViewAccessScoped; pros, cons, > promote/hinder performance, etc... > > OR, should I move to CDI @RequestScoped, ASAP??? :) > > Oh, Romain informed me that tomee.xml JDBC resources automatically have > pooling. I hope that is the case, because as soon as regression testing is > complete, I would like to push the new CDI version of my JSF web app to > production, and start using some of the other/neat features of CDI, like > CDI events where possible. :) > > Thanks, > Howard >