Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p><em>Is it correct to say that one can toggle between JSF and CDI scope annotations just by changing the imports in the bean classes without any changes to the Facelets xhtml code?</em></p> </blockquote> <p>Yes.</p> <hr> <blockquote> <p><em>Is it an established pattern that JSF/Facelets should be used only for the xhtml markup code with all scope and lifecycle (plus injection) annotations done using CDI?</em></p> </blockquote> <p>JSF is moving towards CDI. The new <code>@FlowScoped</code> annotation of the upcoming <a href="http://jdevelopment.nl/jsf-22/" rel="nofollow noreferrer">JSF 2.2</a> is evidence of this as this extends from the CDI API. The only disadvantage is that CDI doesn't offer a standard annotation for the tremendously useful JSF <code>@ViewScoped</code> annotation. You'd need <code>@ConversationScoped</code> wherein you manually start and end the conversation, or take a look at a CDI extension like <a href="http://myfaces.apache.org/extensions/cdi/" rel="nofollow noreferrer">MyFaces CODI</a>.</p> <hr> <blockquote> <p><em>In a JBoss AS setting, where is the lifecycle management of the JSF backing beans (using either JSF or CDI annotations) taking place? In the web container or in the EJB3 container?</em></p> </blockquote> <p>The web container (in flavor of a WAR). JSF is built on top of the <a href="https://stackoverflow.com/tags/servlets/info">Servlet API</a>, so it's definitely the web container.</p> <hr> <blockquote> <p><em>In a typical web application given that the SessionScoped beans can be provided by CDI, is there any need for using EJB3 beans other than those of type @Entity, e.g. for the last typical step in each "flow" when information is to be persisted in the database?</em></p> </blockquote> <p>The <code>@Entity</code> is part of JPA, not of EJB. The <code>@Entity</code> is to be used on a model class which is mapped to a database table and usually solely meant to transfer data across the layers. What you're last describing sounds like candidate for a <code>@Stateful</code> EJB. To understand <code>@Stateless</code> vs <code>@Stateful</code> EJBs better, head to this detailed answer: <a href="https://stackoverflow.com/questions/8887140/jsf-request-scoped-bean-keeps-recreating-new-stateful-session-beans-on-every-req/8889612#8889612">JSF request scoped bean keeps recreating new Stateful session beans on every request?</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload