[seam-dev] [cdi-dev] Stafeful services directly from the JSF VS "ViewBean" + stateless service

Peter Muir pmuir at redhat.com
Thu Dec 22 08:06:57 EST 2011


IMO both approaches are valid in different situations, and it entirely depends on the app. If I have multiple view layers (eg jsf and jax rs I will likely want some sort of controller bean betweeny business layer and jsf, so as to not let jsf concerns leak. Otoh if it was just a web app with a jsf front end only, maybe I would dispose of this layer.

--
Pete Muir
http://in.relation.to/Bloggers/Pete

On 22 Dec 2011, at 11:36, "John D. Ament" <john.d.ament at gmail.com> wrote:

> I tried this a few times recently.  the main issue that pops up is that the EJB timeouts and WEB timeouts in the platform do not sync up.  so if you're idle on a page for 5 minutes, your stateful EJB disappears, unless you have someone change container config.
> 
> On Thu, Dec 22, 2011 at 5:49 AM, José Rodolfo Freitas <joserodolfo.freitas at gmail.com> wrote:
> CDI created the possibility to reach any bean in the container from a JSF view, encouraging a closer approach between ejb and jsf (or any cdi bean and jsf), which can potentially lead to a simpler application design. I think that is great!
> 
> However, I'm observing that this new programming model has been experimenting user resistance. The "traditional" way of doing things, using a "ViewBean" accessing a Stateless Service seems to be the 
> more legit.
> 
> What do you think about this? I'd like to discuss best practices around it as I see it's on the core of almost every web application design. 
> 
> 
> 
> 
> 
> _______________________________________________
> seam-dev mailing list
> seam-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/seam-dev
> 
> 
> _______________________________________________
> cdi-dev mailing list
> cdi-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/cdi-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/seam-dev/attachments/20111222/e3ec4a3f/attachment.html 


More information about the seam-dev mailing list